Merge branch 'next' into agpl_next

# Conflicts:
#	lib/include/srslte/phy/ch_estimation/ul_rs_tables.h
#	lib/include/srslte/phy/ue/ue_dl_nr_data.h
#	lib/src/phy/ue/ue_dl_nr_data.c
#	srsue/test/ttcn3/hdr/swappable_log.h
master
srsLTE codebot 4 years ago committed by Your Name
commit c9f48bce7b

@ -0,0 +1,201 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#ifndef SRSLTE_MEM_POOL_H
#define SRSLTE_MEM_POOL_H
#include <cassert>
#include <cstdint>
#include <memory>
#include <mutex>
namespace srslte {
/// Stores provided mem blocks in a stack in an non-owning manner. Not thread-safe
class memblock_stack
{
struct node {
node* prev;
explicit node(node* prev_) : prev(prev_) {}
};
public:
constexpr static size_t min_memblock_size() { return sizeof(node); }
memblock_stack() = default;
memblock_stack(const memblock_stack&) = delete;
memblock_stack(memblock_stack&& other) noexcept : head(other.head) { other.head = nullptr; }
memblock_stack& operator=(const memblock_stack&) = delete;
memblock_stack& operator=(memblock_stack&& other) noexcept
{
head = other.head;
other.head = nullptr;
return *this;
}
void push(uint8_t* block) noexcept
{
// printf("head: %ld\n", (long)head);
node* next = ::new (block) node(head);
head = next;
count++;
}
uint8_t* try_pop() noexcept
{
if (is_empty()) {
return nullptr;
}
node* last_head = head;
head = head->prev;
count--;
return (uint8_t*)last_head;
}
bool is_empty() const { return head == nullptr; }
size_t size() const { return count; }
void clear() { head = nullptr; }
private:
node* head = nullptr;
size_t count = 0;
};
/// memblock stack that mutexes pushing/popping
class mutexed_memblock_stack
{
public:
mutexed_memblock_stack() = default;
mutexed_memblock_stack(const mutexed_memblock_stack&) = delete;
mutexed_memblock_stack(mutexed_memblock_stack&& other) noexcept
{
std::unique_lock<std::mutex> lk1(other.mutex, std::defer_lock);
std::unique_lock<std::mutex> lk2(mutex, std::defer_lock);
std::lock(lk1, lk2);
stack = std::move(other.stack);
}
mutexed_memblock_stack& operator=(const mutexed_memblock_stack&) = delete;
mutexed_memblock_stack& operator=(mutexed_memblock_stack&& other) noexcept
{
std::unique_lock<std::mutex> lk1(other.mutex, std::defer_lock);
std::unique_lock<std::mutex> lk2(mutex, std::defer_lock);
std::lock(lk1, lk2);
stack = std::move(other.stack);
return *this;
}
void push(uint8_t* block) noexcept
{
std::lock_guard<std::mutex> lock(mutex);
stack.push(block);
}
uint8_t* try_pop() noexcept
{
std::lock_guard<std::mutex> lock(mutex);
uint8_t* block = stack.try_pop();
return block;
}
bool is_empty() const noexcept { return stack.is_empty(); }
size_t size() const noexcept
{
std::lock_guard<std::mutex> lock(mutex);
return stack.size();
}
void clear()
{
std::lock_guard<std::mutex> lock(mutex);
stack.clear();
}
private:
memblock_stack stack;
mutable std::mutex mutex;
};
/**
* Pool specialized for big objects. Created objects are not contiguous in memory.
* Relevant methods:
* - ::allocate_node(sz) - allocate memory of sizeof(T), or reuse memory already present in cache
* - ::deallocate_node(void* p) - return memory addressed by p back to the pool to be cached.
* - ::reserve(N) - prereserve memory slots for faster object creation
* @tparam ObjSize object memory size
* @tparam ThreadSafe if object pool is thread-safe or not
*/
template <typename T, bool ThreadSafe = false>
class big_obj_pool
{
// memory stack type derivation (thread safe or not)
using stack_type = typename std::conditional<ThreadSafe, mutexed_memblock_stack, memblock_stack>::type;
// memory stack to cache allocate memory chunks
stack_type stack;
public:
~big_obj_pool() { clear(); }
/// alloc new object space. If no memory is pre-reserved in the pool, malloc is called.
void* allocate_node(size_t sz)
{
assert(sz == sizeof(T));
static const size_t blocksize = std::max(sizeof(T), memblock_stack::min_memblock_size());
uint8_t* block = stack.try_pop();
if (block == nullptr) {
block = new uint8_t[blocksize];
}
return block;
}
void deallocate_node(void* p)
{
if (p != nullptr) {
stack.push(static_cast<uint8_t*>(p));
}
}
/// Pre-reserve N memory chunks for future object allocations
void reserve(size_t N)
{
static const size_t blocksize = std::max(sizeof(T), memblock_stack::min_memblock_size());
for (size_t i = 0; i < N; ++i) {
stack.push(new uint8_t[blocksize]);
}
}
size_t capacity() const { return stack.size(); }
void clear()
{
uint8_t* block = stack.try_pop();
while (block != nullptr) {
delete[] block;
block = stack.try_pop();
}
}
};
} // namespace srslte
#endif // SRSLTE_MEM_POOL_H

@ -92,7 +92,7 @@ public:
R call(void* src, Args&&... args) const final { return (*static_cast<FunT*>(src))(std::forward<Args>(args)...); } R call(void* src, Args&&... args) const final { return (*static_cast<FunT*>(src))(std::forward<Args>(args)...); }
void move(void* src, void* dest) const final void move(void* src, void* dest) const final
{ {
::new (dest) FunT{std::move(*static_cast<FunT*>(src))}; ::new (dest) FunT(std::move(*static_cast<FunT*>(src)));
static_cast<FunT*>(src)->~FunT(); static_cast<FunT*>(src)->~FunT();
} }
void dtor(void* src) const final { static_cast<FunT*>(src)->~FunT(); } void dtor(void* src) const final { static_cast<FunT*>(src)->~FunT(); }
@ -149,7 +149,7 @@ public:
using FunT = typename std::decay<T>::type; using FunT = typename std::decay<T>::type;
static const task_details::smallbuffer_table_t<FunT, R, Args...> small_oper_table{}; static const task_details::smallbuffer_table_t<FunT, R, Args...> small_oper_table{};
oper_ptr = &small_oper_table; oper_ptr = &small_oper_table;
::new (&buffer) FunT{std::forward<T>(function)}; ::new (&buffer) FunT(std::forward<T>(function));
} }
//! Called when T capture does not fit the move_callback buffer //! Called when T capture does not fit the move_callback buffer

@ -1340,6 +1340,8 @@ typedef struct {
bool onexsrvcc_present; bool onexsrvcc_present;
bool nf; bool nf;
bool nf_present; bool nf_present;
bool dc_nr;
bool dc_nr_present;
} LIBLTE_MME_UE_NETWORK_CAPABILITY_STRUCT; } LIBLTE_MME_UE_NETWORK_CAPABILITY_STRUCT;
// Functions // Functions
LIBLTE_ERROR_ENUM liblte_mme_pack_ue_network_capability_ie(LIBLTE_MME_UE_NETWORK_CAPABILITY_STRUCT* ue_network_cap, LIBLTE_ERROR_ENUM liblte_mme_pack_ue_network_capability_ie(LIBLTE_MME_UE_NETWORK_CAPABILITY_STRUCT* ue_network_cap,
@ -2536,6 +2538,7 @@ LIBLTE_ERROR_ENUM liblte_mme_unpack_attach_reject_msg(LIBLTE_BYTE_MSG_STRUCT*
#define LIBLTE_MME_VOICE_DOMAIN_PREF_AND_UE_USAGE_SETTING_IEI 0x5D #define LIBLTE_MME_VOICE_DOMAIN_PREF_AND_UE_USAGE_SETTING_IEI 0x5D
#define LIBLTE_MME_ATTACH_REQUEST_DEVICE_PROPERTIES_IEI 0xD #define LIBLTE_MME_ATTACH_REQUEST_DEVICE_PROPERTIES_IEI 0xD
#define LIBLTE_MME_GUTI_TYPE_IEI 0xE #define LIBLTE_MME_GUTI_TYPE_IEI 0xE
#define LIBLTE_MME_ADDITIONAL_SECURITY_CAP_IEI 0x6F
// Enums // Enums
// Structs // Structs
typedef struct { typedef struct {
@ -2572,6 +2575,7 @@ typedef struct {
bool voice_domain_pref_and_ue_usage_setting_present; bool voice_domain_pref_and_ue_usage_setting_present;
bool device_properties_present; bool device_properties_present;
bool old_guti_type_present; bool old_guti_type_present;
bool additional_security_cap_present;
} LIBLTE_MME_ATTACH_REQUEST_MSG_STRUCT; } LIBLTE_MME_ATTACH_REQUEST_MSG_STRUCT;
// Functions // Functions
LIBLTE_ERROR_ENUM liblte_mme_pack_attach_request_msg(LIBLTE_MME_ATTACH_REQUEST_MSG_STRUCT* attach_req, LIBLTE_ERROR_ENUM liblte_mme_pack_attach_request_msg(LIBLTE_MME_ATTACH_REQUEST_MSG_STRUCT* attach_req,

@ -65,7 +65,7 @@ struct mib_mbms_r14_s {
}; };
// BCCH-BCH-MessageType-MBMS-r14 ::= MasterInformationBlock-MBMS-r14 // BCCH-BCH-MessageType-MBMS-r14 ::= MasterInformationBlock-MBMS-r14
typedef mib_mbms_r14_s bcch_bch_msg_type_mbms_r14_s; using bcch_bch_msg_type_mbms_r14_s = mib_mbms_r14_s;
// BCCH-BCH-Message-MBMS ::= SEQUENCE // BCCH-BCH-Message-MBMS ::= SEQUENCE
struct bcch_bch_msg_mbms_s { struct bcch_bch_msg_mbms_s {
@ -78,7 +78,7 @@ struct bcch_bch_msg_mbms_s {
}; };
// SystemInformation-MBMS-r14 ::= SystemInformation // SystemInformation-MBMS-r14 ::= SystemInformation
typedef sys_info_s sys_info_mbms_r14_s; using sys_info_mbms_r14_s = sys_info_s;
// BCCH-DL-SCH-MessageType-MBMS-r14 ::= CHOICE // BCCH-DL-SCH-MessageType-MBMS-r14 ::= CHOICE
struct bcch_dl_sch_msg_type_mbms_r14_c { struct bcch_dl_sch_msg_type_mbms_r14_c {
@ -151,9 +151,6 @@ struct bcch_dl_sch_msg_type_mbms_r14_c {
// choice methods // choice methods
bcch_dl_sch_msg_type_mbms_r14_c() = default; bcch_dl_sch_msg_type_mbms_r14_c() = default;
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); void set(types::options e = types::nulltype);
types type() const { return type_; } types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -163,24 +160,23 @@ struct bcch_dl_sch_msg_type_mbms_r14_c {
c1_c_& c1() c1_c_& c1()
{ {
assert_choice_type("c1", type_.to_string(), "BCCH-DL-SCH-MessageType-MBMS-r14"); assert_choice_type("c1", type_.to_string(), "BCCH-DL-SCH-MessageType-MBMS-r14");
return c.get<c1_c_>(); return c;
} }
const c1_c_& c1() const const c1_c_& c1() const
{ {
assert_choice_type("c1", type_.to_string(), "BCCH-DL-SCH-MessageType-MBMS-r14"); assert_choice_type("c1", type_.to_string(), "BCCH-DL-SCH-MessageType-MBMS-r14");
return c.get<c1_c_>(); return c;
} }
c1_c_& set_c1() c1_c_& set_c1()
{ {
set(types::c1); set(types::c1);
return c.get<c1_c_>(); return c;
} }
void set_msg_class_ext() { set(types::msg_class_ext); }
private: private:
types type_; types type_;
choice_buffer_t<c1_c_> c; c1_c_ c;
void destroy_();
}; };
// BCCH-DL-SCH-Message-MBMS ::= SEQUENCE // BCCH-DL-SCH-Message-MBMS ::= SEQUENCE
@ -193,6 +189,9 @@ struct bcch_dl_sch_msg_mbms_s {
void to_json(json_writer& j) const; void to_json(json_writer& j) const;
}; };
// ThresholdEUTRA-v1250 ::= INTEGER (0..97)
using thres_eutra_v1250 = uint8_t;
// MBMS-SessionInfo-r9 ::= SEQUENCE // MBMS-SessionInfo-r9 ::= SEQUENCE
struct mbms_session_info_r9_s { struct mbms_session_info_r9_s {
bool ext = false; bool ext = false;
@ -507,9 +506,6 @@ struct mcch_msg_type_c {
// choice methods // choice methods
later_c_() = default; later_c_() = default;
later_c_(const later_c_& other);
later_c_& operator=(const later_c_& other);
~later_c_() { destroy_(); }
void set(types::options e = types::nulltype); void set(types::options e = types::nulltype);
types type() const { return type_; } types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -519,24 +515,23 @@ struct mcch_msg_type_c {
c2_c_& c2() c2_c_& c2()
{ {
assert_choice_type("c2", type_.to_string(), "later"); assert_choice_type("c2", type_.to_string(), "later");
return c.get<c2_c_>(); return c;
} }
const c2_c_& c2() const const c2_c_& c2() const
{ {
assert_choice_type("c2", type_.to_string(), "later"); assert_choice_type("c2", type_.to_string(), "later");
return c.get<c2_c_>(); return c;
} }
c2_c_& set_c2() c2_c_& set_c2()
{ {
set(types::c2); set(types::c2);
return c.get<c2_c_>(); return c;
} }
void set_msg_class_ext() { set(types::msg_class_ext); }
private: private:
types type_; types type_;
choice_buffer_t<c2_c_> c; c2_c_ c;
void destroy_();
}; };
struct types_opts { struct types_opts {
enum options { c1, later, nulltype } value; enum options { c1, later, nulltype } value;
@ -1618,6 +1613,7 @@ struct sc_mcch_msg_type_r13_c {
set(types::scptm_cfg_br_r14); set(types::scptm_cfg_br_r14);
return c; return c;
} }
void set_spare() { set(types::spare); }
private: private:
types type_; types type_;
@ -1634,9 +1630,6 @@ struct sc_mcch_msg_type_r13_c {
// choice methods // choice methods
msg_class_ext_c_() = default; msg_class_ext_c_() = default;
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); void set(types::options e = types::nulltype);
types type() const { return type_; } types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -1646,24 +1639,23 @@ struct sc_mcch_msg_type_r13_c {
c2_c_& c2() c2_c_& c2()
{ {
assert_choice_type("c2", type_.to_string(), "messageClassExtension"); assert_choice_type("c2", type_.to_string(), "messageClassExtension");
return c.get<c2_c_>(); return c;
} }
const c2_c_& c2() const const c2_c_& c2() const
{ {
assert_choice_type("c2", type_.to_string(), "messageClassExtension"); assert_choice_type("c2", type_.to_string(), "messageClassExtension");
return c.get<c2_c_>(); return c;
} }
c2_c_& set_c2() c2_c_& set_c2()
{ {
set(types::c2); set(types::c2);
return c.get<c2_c_>(); return c;
} }
void set_msg_class_ext_future_r14() { set(types::msg_class_ext_future_r14); }
private: private:
types type_; types type_;
choice_buffer_t<c2_c_> c; c2_c_ c;
void destroy_();
}; };
struct types_opts { struct types_opts {
enum options { c1, msg_class_ext, nulltype } value; enum options { c1, msg_class_ext, nulltype } value;
@ -1744,18 +1736,6 @@ struct fail_report_scg_v12d0_s {
void to_json(json_writer& j) const; void to_json(json_writer& j) const;
}; };
// SCGFailureInformation-v12d0b-IEs ::= SEQUENCE
struct scg_fail_info_v12d0b_ies_s {
bool fail_report_scg_v12d0_present = false;
bool non_crit_ext_present = false;
fail_report_scg_v12d0_s fail_report_scg_v12d0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// MIMO-WeightedLayersCapabilities-r13 ::= SEQUENCE // MIMO-WeightedLayersCapabilities-r13 ::= SEQUENCE
struct mimo_weighted_layers_cap_r13_s { struct mimo_weighted_layers_cap_r13_s {
struct rel_weight_two_layers_r13_opts { struct rel_weight_two_layers_r13_opts {
@ -1852,10 +1832,11 @@ struct phy_layer_params_v13e0_s {
void to_json(json_writer& j) const; void to_json(json_writer& j) const;
}; };
// UE-EUTRA-Capability-v13e0b-IEs ::= SEQUENCE // SCGFailureInformation-v12d0b-IEs ::= SEQUENCE
struct ue_eutra_cap_v13e0b_ies_s { struct scg_fail_info_v12d0b_ies_s {
bool fail_report_scg_v12d0_present = false;
bool non_crit_ext_present = false; bool non_crit_ext_present = false;
phy_layer_params_v13e0_s phy_layer_params_v13e0; fail_report_scg_v12d0_s fail_report_scg_v12d0;
// sequence methods // sequence methods
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -1863,11 +1844,10 @@ struct ue_eutra_cap_v13e0b_ies_s {
void to_json(json_writer& j) const; void to_json(json_writer& j) const;
}; };
// SCG-Config-v12i0b-IEs ::= SEQUENCE // UE-EUTRA-Capability-v13e0b-IEs ::= SEQUENCE
struct scg_cfg_v12i0b_ies_s { struct ue_eutra_cap_v13e0b_ies_s {
bool scg_radio_cfg_v12i0_present = false;
bool non_crit_ext_present = false; bool non_crit_ext_present = false;
scg_cfg_part_scg_v12f0_s scg_radio_cfg_v12i0; phy_layer_params_v13e0_s phy_layer_params_v13e0;
// sequence methods // sequence methods
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -2217,7 +2197,7 @@ using meas_result_serv_cell_list_scg_ext_r13_l = dyn_array<meas_result_serv_cell
using meas_result_serv_cell_list_scg_r12_l = dyn_array<meas_result_serv_cell_scg_r12_s>; using meas_result_serv_cell_list_scg_r12_l = dyn_array<meas_result_serv_cell_scg_r12_s>;
// SBCCH-SL-BCH-MessageType ::= MasterInformationBlock-SL // SBCCH-SL-BCH-MessageType ::= MasterInformationBlock-SL
typedef mib_sl_s sbcch_sl_bch_msg_type_s; using sbcch_sl_bch_msg_type_s = mib_sl_s;
// SBCCH-SL-BCH-Message ::= SEQUENCE // SBCCH-SL-BCH-Message ::= SEQUENCE
struct sbcch_sl_bch_msg_s { struct sbcch_sl_bch_msg_s {
@ -2230,7 +2210,7 @@ struct sbcch_sl_bch_msg_s {
}; };
// SBCCH-SL-BCH-MessageType-V2X-r14 ::= MasterInformationBlock-SL-V2X-r14 // SBCCH-SL-BCH-MessageType-V2X-r14 ::= MasterInformationBlock-SL-V2X-r14
typedef mib_sl_v2x_r14_s sbcch_sl_bch_msg_type_v2x_r14_s; using sbcch_sl_bch_msg_type_v2x_r14_s = mib_sl_v2x_r14_s;
// SBCCH-SL-BCH-Message-V2X-r14 ::= SEQUENCE // SBCCH-SL-BCH-Message-V2X-r14 ::= SEQUENCE
struct sbcch_sl_bch_msg_v2x_r14_s { struct sbcch_sl_bch_msg_v2x_r14_s {
@ -2242,6 +2222,18 @@ struct sbcch_sl_bch_msg_v2x_r14_s {
void to_json(json_writer& j) const; void to_json(json_writer& j) const;
}; };
// SCG-Config-v12i0b-IEs ::= SEQUENCE
struct scg_cfg_v12i0b_ies_s {
bool scg_radio_cfg_v12i0_present = false;
bool non_crit_ext_present = false;
scg_cfg_part_scg_v12f0_s scg_radio_cfg_v12i0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// SCG-ConfigInfo-v1530-IEs ::= SEQUENCE // SCG-ConfigInfo-v1530-IEs ::= SEQUENCE
struct scg_cfg_info_v1530_ies_s { struct scg_cfg_info_v1530_ies_s {
bool drb_to_add_mod_list_scg_r15_present = false; bool drb_to_add_mod_list_scg_r15_present = false;
@ -2388,18 +2380,22 @@ struct scg_cfg_info_r12_s {
set(types::scg_cfg_info_r12); set(types::scg_cfg_info_r12);
return c; return c;
} }
void set_spare7() { set(types::spare7); }
void set_spare6() { set(types::spare6); }
void set_spare5() { set(types::spare5); }
void set_spare4() { set(types::spare4); }
void set_spare3() { set(types::spare3); }
void set_spare2() { set(types::spare2); }
void set_spare1() { set(types::spare1); }
private: private:
types type_; types type_;
scg_cfg_info_r12_ies_s c; scg_cfg_info_r12_ies_s c;
}; };
typedef c1_or_crit_ext_e types; using types = c1_or_crit_ext_e;
// choice methods // choice methods
crit_exts_c_() = default; crit_exts_c_() = default;
crit_exts_c_(const crit_exts_c_& other);
crit_exts_c_& operator=(const crit_exts_c_& other);
~crit_exts_c_() { destroy_(); }
void set(types::options e = types::nulltype); void set(types::options e = types::nulltype);
types type() const { return type_; } types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -2409,24 +2405,23 @@ struct scg_cfg_info_r12_s {
c1_c_& c1() c1_c_& c1()
{ {
assert_choice_type("c1", type_.to_string(), "criticalExtensions"); assert_choice_type("c1", type_.to_string(), "criticalExtensions");
return c.get<c1_c_>(); return c;
} }
const c1_c_& c1() const const c1_c_& c1() const
{ {
assert_choice_type("c1", type_.to_string(), "criticalExtensions"); assert_choice_type("c1", type_.to_string(), "criticalExtensions");
return c.get<c1_c_>(); return c;
} }
c1_c_& set_c1() c1_c_& set_c1()
{ {
set(types::c1); set(types::c1);
return c.get<c1_c_>(); return c;
} }
void set_crit_exts_future() { set(types::crit_exts_future); }
private: private:
types type_; types type_;
choice_buffer_t<c1_c_> c; c1_c_ c;
void destroy_();
}; };
// member variables // member variables
@ -3087,7 +3082,7 @@ using var_meas_report_list_l = dyn_array<var_meas_report_s>;
using var_meas_report_list_r12_l = dyn_array<var_meas_report_s>; using var_meas_report_list_r12_l = dyn_array<var_meas_report_s>;
// VarMobilityHistoryReport-r12 ::= VisitedCellInfoList-r12 // VarMobilityHistoryReport-r12 ::= VisitedCellInfoList-r12
typedef visited_cell_info_list_r12_l var_mob_history_report_r12_l; using var_mob_history_report_r12_l = visited_cell_info_list_r12_l;
// VarRLF-Report-r10 ::= SEQUENCE // VarRLF-Report-r10 ::= SEQUENCE
struct var_rlf_report_r10_s { struct var_rlf_report_r10_s {
@ -3124,7 +3119,7 @@ struct var_short_inactive_mac_input_r15_s {
}; };
// VarShortMAC-Input-NB-r13 ::= VarShortMAC-Input // VarShortMAC-Input-NB-r13 ::= VarShortMAC-Input
typedef var_short_mac_input_s var_short_mac_input_nb_r13_s; using var_short_mac_input_nb_r13_s = var_short_mac_input_s;
// VarShortResumeMAC-Input-r13 ::= SEQUENCE // VarShortResumeMAC-Input-r13 ::= SEQUENCE
struct var_short_resume_mac_input_r13_s { struct var_short_resume_mac_input_r13_s {
@ -3140,7 +3135,7 @@ struct var_short_resume_mac_input_r13_s {
}; };
// VarShortResumeMAC-Input-NB-r13 ::= VarShortResumeMAC-Input-r13 // VarShortResumeMAC-Input-NB-r13 ::= VarShortResumeMAC-Input-r13
typedef var_short_resume_mac_input_r13_s var_short_resume_mac_input_nb_r13_s; using var_short_resume_mac_input_nb_r13_s = var_short_resume_mac_input_r13_s;
// VarWLAN-MobilityConfig ::= SEQUENCE // VarWLAN-MobilityConfig ::= SEQUENCE
struct var_wlan_mob_cfg_s { struct var_wlan_mob_cfg_s {

File diff suppressed because it is too large Load Diff

@ -80,6 +80,7 @@ struct sl_tx_pwr_r14_c {
assert_choice_type("txPower-r14", type_.to_string(), "SL-TxPower-r14"); assert_choice_type("txPower-r14", type_.to_string(), "SL-TxPower-r14");
return c; return c;
} }
void set_minusinfinity_r14() { set(types::minusinfinity_r14); }
int8_t& set_tx_pwr_r14() int8_t& set_tx_pwr_r14()
{ {
set(types::tx_pwr_r14); set(types::tx_pwr_r14);
@ -927,6 +928,7 @@ struct sl_disc_res_pool_r12_s {
set(types::rsrp_based_r12); set(types::rsrp_based_r12);
return c; return c;
} }
void set_random_r12() { set(types::random_r12); }
private: private:
types type_; types type_;
@ -965,7 +967,7 @@ struct sl_disc_res_pool_r12_s {
uint8_t to_number() const; uint8_t to_number() const;
}; };
typedef enumerated<setup_opts> setup_e_; typedef enumerated<setup_opts> setup_e_;
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
disc_period_v1310_c_() = default; disc_period_v1310_c_() = default;
@ -985,6 +987,7 @@ struct sl_disc_res_pool_r12_s {
assert_choice_type("setup", type_.to_string(), "discPeriod-v1310"); assert_choice_type("setup", type_.to_string(), "discPeriod-v1310");
return c; return c;
} }
void set_release() { set(types::release); }
setup_e_& set_setup() setup_e_& set_setup()
{ {
set(types::setup); set(types::setup);
@ -999,7 +1002,7 @@ struct sl_disc_res_pool_r12_s {
struct setup_s_ { struct setup_s_ {
pci_list_r13_l pci_r13; pci_list_r13_l pci_r13;
}; };
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
rx_params_add_neigh_freq_r13_c_() = default; rx_params_add_neigh_freq_r13_c_() = default;
@ -1019,6 +1022,7 @@ struct sl_disc_res_pool_r12_s {
assert_choice_type("setup", type_.to_string(), "rxParamsAddNeighFreq-r13"); assert_choice_type("setup", type_.to_string(), "rxParamsAddNeighFreq-r13");
return c; return c;
} }
void set_release() { set(types::release); }
setup_s_& set_setup() setup_s_& set_setup()
{ {
set(types::setup); set(types::setup);
@ -1062,7 +1066,7 @@ struct sl_disc_res_pool_r12_s {
int8_t ref_sig_pwr = -60; int8_t ref_sig_pwr = -60;
uint8_t sync_cfg_idx_r13 = 0; uint8_t sync_cfg_idx_r13 = 0;
}; };
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
tx_params_add_neigh_freq_r13_c_() = default; tx_params_add_neigh_freq_r13_c_() = default;
@ -1082,6 +1086,7 @@ struct sl_disc_res_pool_r12_s {
assert_choice_type("setup", type_.to_string(), "txParamsAddNeighFreq-r13"); assert_choice_type("setup", type_.to_string(), "txParamsAddNeighFreq-r13");
return c; return c;
} }
void set_release() { set(types::release); }
setup_s_& set_setup() setup_s_& set_setup()
{ {
set(types::setup); set(types::setup);
@ -1101,7 +1106,7 @@ struct sl_disc_res_pool_r12_s {
// member variables // member variables
freq_info_v1370_s_ freq_info_v1370; freq_info_v1370_s_ freq_info_v1370;
}; };
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
tx_params_add_neigh_freq_v1370_c_() = default; tx_params_add_neigh_freq_v1370_c_() = default;
@ -1121,6 +1126,7 @@ struct sl_disc_res_pool_r12_s {
assert_choice_type("setup", type_.to_string(), "txParamsAddNeighFreq-v1370"); assert_choice_type("setup", type_.to_string(), "txParamsAddNeighFreq-v1370");
return c; return c;
} }
void set_release() { set(types::release); }
setup_s_& set_setup() setup_s_& set_setup()
{ {
set(types::setup); set(types::setup);
@ -1406,11 +1412,14 @@ struct sl_disc_tx_res_inter_freq_r13_c {
assert_choice_type("discTxPoolCommon-r13", type_.to_string(), "SL-DiscTxResourcesInterFreq-r13"); assert_choice_type("discTxPoolCommon-r13", type_.to_string(), "SL-DiscTxResourcesInterFreq-r13");
return c; return c;
} }
void set_acquire_si_from_carrier_r13() { set(types::acquire_si_from_carrier_r13); }
sl_disc_tx_pool_list_r12_l& set_disc_tx_pool_common_r13() sl_disc_tx_pool_list_r12_l& set_disc_tx_pool_common_r13()
{ {
set(types::disc_tx_pool_common_r13); set(types::disc_tx_pool_common_r13);
return c; return c;
} }
void set_request_ded_r13() { set(types::request_ded_r13); }
void set_no_tx_on_carrier_r13() { set(types::no_tx_on_carrier_r13); }
private: private:
types type_; types type_;

@ -587,18 +587,22 @@ struct rrc_conn_reest_s {
set(types::rrc_conn_reest_r8); set(types::rrc_conn_reest_r8);
return c; return c;
} }
void set_spare7() { set(types::spare7); }
void set_spare6() { set(types::spare6); }
void set_spare5() { set(types::spare5); }
void set_spare4() { set(types::spare4); }
void set_spare3() { set(types::spare3); }
void set_spare2() { set(types::spare2); }
void set_spare1() { set(types::spare1); }
private: private:
types type_; types type_;
rrc_conn_reest_r8_ies_s c; rrc_conn_reest_r8_ies_s c;
}; };
typedef c1_or_crit_ext_e types; using types = c1_or_crit_ext_e;
// choice methods // choice methods
crit_exts_c_() = default; crit_exts_c_() = default;
crit_exts_c_(const crit_exts_c_& other);
crit_exts_c_& operator=(const crit_exts_c_& other);
~crit_exts_c_() { destroy_(); }
void set(types::options e = types::nulltype); void set(types::options e = types::nulltype);
types type() const { return type_; } types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -608,24 +612,23 @@ struct rrc_conn_reest_s {
c1_c_& c1() c1_c_& c1()
{ {
assert_choice_type("c1", type_.to_string(), "criticalExtensions"); assert_choice_type("c1", type_.to_string(), "criticalExtensions");
return c.get<c1_c_>(); return c;
} }
const c1_c_& c1() const const c1_c_& c1() const
{ {
assert_choice_type("c1", type_.to_string(), "criticalExtensions"); assert_choice_type("c1", type_.to_string(), "criticalExtensions");
return c.get<c1_c_>(); return c;
} }
c1_c_& set_c1() c1_c_& set_c1()
{ {
set(types::c1); set(types::c1);
return c.get<c1_c_>(); return c;
} }
void set_crit_exts_future() { set(types::crit_exts_future); }
private: private:
types type_; types type_;
choice_buffer_t<c1_c_> c; c1_c_ c;
void destroy_();
}; };
// member variables // member variables
@ -650,9 +653,6 @@ struct rrc_conn_reest_reject_s {
// choice methods // choice methods
crit_exts_c_() = default; crit_exts_c_() = default;
crit_exts_c_(const crit_exts_c_& other);
crit_exts_c_& operator=(const crit_exts_c_& other);
~crit_exts_c_() { destroy_(); }
void set(types::options e = types::nulltype); void set(types::options e = types::nulltype);
types type() const { return type_; } types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -662,24 +662,23 @@ struct rrc_conn_reest_reject_s {
rrc_conn_reest_reject_r8_ies_s& rrc_conn_reest_reject_r8() rrc_conn_reest_reject_r8_ies_s& rrc_conn_reest_reject_r8()
{ {
assert_choice_type("rrcConnectionReestablishmentReject-r8", type_.to_string(), "criticalExtensions"); assert_choice_type("rrcConnectionReestablishmentReject-r8", type_.to_string(), "criticalExtensions");
return c.get<rrc_conn_reest_reject_r8_ies_s>(); return c;
} }
const rrc_conn_reest_reject_r8_ies_s& rrc_conn_reest_reject_r8() const const rrc_conn_reest_reject_r8_ies_s& rrc_conn_reest_reject_r8() const
{ {
assert_choice_type("rrcConnectionReestablishmentReject-r8", type_.to_string(), "criticalExtensions"); assert_choice_type("rrcConnectionReestablishmentReject-r8", type_.to_string(), "criticalExtensions");
return c.get<rrc_conn_reest_reject_r8_ies_s>(); return c;
} }
rrc_conn_reest_reject_r8_ies_s& set_rrc_conn_reest_reject_r8() rrc_conn_reest_reject_r8_ies_s& set_rrc_conn_reest_reject_r8()
{ {
set(types::rrc_conn_reest_reject_r8); set(types::rrc_conn_reest_reject_r8);
return c.get<rrc_conn_reest_reject_r8_ies_s>(); return c;
} }
void set_crit_exts_future() { set(types::crit_exts_future); }
private: private:
types type_; types type_;
choice_buffer_t<rrc_conn_reest_reject_r8_ies_s> c; rrc_conn_reest_reject_r8_ies_s c;
void destroy_();
}; };
// member variables // member variables
@ -725,18 +724,18 @@ struct rrc_conn_reject_s {
set(types::rrc_conn_reject_r8); set(types::rrc_conn_reject_r8);
return c; return c;
} }
void set_spare3() { set(types::spare3); }
void set_spare2() { set(types::spare2); }
void set_spare1() { set(types::spare1); }
private: private:
types type_; types type_;
rrc_conn_reject_r8_ies_s c; rrc_conn_reject_r8_ies_s c;
}; };
typedef c1_or_crit_ext_e types; using types = c1_or_crit_ext_e;
// choice methods // choice methods
crit_exts_c_() = default; crit_exts_c_() = default;
crit_exts_c_(const crit_exts_c_& other);
crit_exts_c_& operator=(const crit_exts_c_& other);
~crit_exts_c_() { destroy_(); }
void set(types::options e = types::nulltype); void set(types::options e = types::nulltype);
types type() const { return type_; } types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -746,24 +745,23 @@ struct rrc_conn_reject_s {
c1_c_& c1() c1_c_& c1()
{ {
assert_choice_type("c1", type_.to_string(), "criticalExtensions"); assert_choice_type("c1", type_.to_string(), "criticalExtensions");
return c.get<c1_c_>(); return c;
} }
const c1_c_& c1() const const c1_c_& c1() const
{ {
assert_choice_type("c1", type_.to_string(), "criticalExtensions"); assert_choice_type("c1", type_.to_string(), "criticalExtensions");
return c.get<c1_c_>(); return c;
} }
c1_c_& set_c1() c1_c_& set_c1()
{ {
set(types::c1); set(types::c1);
return c.get<c1_c_>(); return c;
} }
void set_crit_exts_future() { set(types::crit_exts_future); }
private: private:
types type_; types type_;
choice_buffer_t<c1_c_> c; c1_c_ c;
void destroy_();
}; };
// member variables // member variables
@ -809,18 +807,22 @@ struct rrc_conn_setup_s {
set(types::rrc_conn_setup_r8); set(types::rrc_conn_setup_r8);
return c; return c;
} }
void set_spare7() { set(types::spare7); }
void set_spare6() { set(types::spare6); }
void set_spare5() { set(types::spare5); }
void set_spare4() { set(types::spare4); }
void set_spare3() { set(types::spare3); }
void set_spare2() { set(types::spare2); }
void set_spare1() { set(types::spare1); }
private: private:
types type_; types type_;
rrc_conn_setup_r8_ies_s c; rrc_conn_setup_r8_ies_s c;
}; };
typedef c1_or_crit_ext_e types; using types = c1_or_crit_ext_e;
// choice methods // choice methods
crit_exts_c_() = default; crit_exts_c_() = default;
crit_exts_c_(const crit_exts_c_& other);
crit_exts_c_& operator=(const crit_exts_c_& other);
~crit_exts_c_() { destroy_(); }
void set(types::options e = types::nulltype); void set(types::options e = types::nulltype);
types type() const { return type_; } types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -830,24 +832,23 @@ struct rrc_conn_setup_s {
c1_c_& c1() c1_c_& c1()
{ {
assert_choice_type("c1", type_.to_string(), "criticalExtensions"); assert_choice_type("c1", type_.to_string(), "criticalExtensions");
return c.get<c1_c_>(); return c;
} }
const c1_c_& c1() const const c1_c_& c1() const
{ {
assert_choice_type("c1", type_.to_string(), "criticalExtensions"); assert_choice_type("c1", type_.to_string(), "criticalExtensions");
return c.get<c1_c_>(); return c;
} }
c1_c_& set_c1() c1_c_& set_c1()
{ {
set(types::c1); set(types::c1);
return c.get<c1_c_>(); return c;
} }
void set_crit_exts_future() { set(types::crit_exts_future); }
private: private:
types type_; types type_;
choice_buffer_t<c1_c_> c; c1_c_ c;
void destroy_();
}; };
// member variables // member variables
@ -872,9 +873,6 @@ struct rrc_early_data_complete_r15_s {
// choice methods // choice methods
crit_exts_c_() = default; crit_exts_c_() = default;
crit_exts_c_(const crit_exts_c_& other);
crit_exts_c_& operator=(const crit_exts_c_& other);
~crit_exts_c_() { destroy_(); }
void set(types::options e = types::nulltype); void set(types::options e = types::nulltype);
types type() const { return type_; } types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -884,24 +882,23 @@ struct rrc_early_data_complete_r15_s {
rrc_early_data_complete_r15_ies_s& rrc_early_data_complete_r15() rrc_early_data_complete_r15_ies_s& rrc_early_data_complete_r15()
{ {
assert_choice_type("rrcEarlyDataComplete-r15", type_.to_string(), "criticalExtensions"); assert_choice_type("rrcEarlyDataComplete-r15", type_.to_string(), "criticalExtensions");
return c.get<rrc_early_data_complete_r15_ies_s>(); return c;
} }
const rrc_early_data_complete_r15_ies_s& rrc_early_data_complete_r15() const const rrc_early_data_complete_r15_ies_s& rrc_early_data_complete_r15() const
{ {
assert_choice_type("rrcEarlyDataComplete-r15", type_.to_string(), "criticalExtensions"); assert_choice_type("rrcEarlyDataComplete-r15", type_.to_string(), "criticalExtensions");
return c.get<rrc_early_data_complete_r15_ies_s>(); return c;
} }
rrc_early_data_complete_r15_ies_s& set_rrc_early_data_complete_r15() rrc_early_data_complete_r15_ies_s& set_rrc_early_data_complete_r15()
{ {
set(types::rrc_early_data_complete_r15); set(types::rrc_early_data_complete_r15);
return c.get<rrc_early_data_complete_r15_ies_s>(); return c;
} }
void set_crit_exts_future() { set(types::crit_exts_future); }
private: private:
types type_; types type_;
choice_buffer_t<rrc_early_data_complete_r15_ies_s> c; rrc_early_data_complete_r15_ies_s c;
void destroy_();
}; };
// member variables // member variables
@ -1033,6 +1030,9 @@ struct dl_ccch_msg_type_c {
set(types::rrc_early_data_complete_r15); set(types::rrc_early_data_complete_r15);
return c; return c;
} }
void set_spare3() { set(types::spare3); }
void set_spare2() { set(types::spare2); }
void set_spare1() { set(types::spare1); }
private: private:
types type_; types type_;
@ -1049,9 +1049,6 @@ struct dl_ccch_msg_type_c {
// choice methods // choice methods
msg_class_ext_c_() = default; msg_class_ext_c_() = default;
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); void set(types::options e = types::nulltype);
types type() const { return type_; } types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -1061,24 +1058,23 @@ struct dl_ccch_msg_type_c {
c2_c_& c2() c2_c_& c2()
{ {
assert_choice_type("c2", type_.to_string(), "messageClassExtension"); assert_choice_type("c2", type_.to_string(), "messageClassExtension");
return c.get<c2_c_>(); return c;
} }
const c2_c_& c2() const const c2_c_& c2() const
{ {
assert_choice_type("c2", type_.to_string(), "messageClassExtension"); assert_choice_type("c2", type_.to_string(), "messageClassExtension");
return c.get<c2_c_>(); return c;
} }
c2_c_& set_c2() c2_c_& set_c2()
{ {
set(types::c2); set(types::c2);
return c.get<c2_c_>(); return c;
} }
void set_msg_class_ext_future_r15() { set(types::msg_class_ext_future_r15); }
private: private:
types type_; types type_;
choice_buffer_t<c2_c_> c; c2_c_ c;
void destroy_();
}; };
struct types_opts { struct types_opts {
enum options { c1, msg_class_ext, nulltype } value; enum options { c1, msg_class_ext, nulltype } value;

File diff suppressed because it is too large Load Diff

@ -151,18 +151,22 @@ struct scg_cfg_r12_s {
set(types::scg_cfg_r12); set(types::scg_cfg_r12);
return c; return c;
} }
void set_spare7() { set(types::spare7); }
void set_spare6() { set(types::spare6); }
void set_spare5() { set(types::spare5); }
void set_spare4() { set(types::spare4); }
void set_spare3() { set(types::spare3); }
void set_spare2() { set(types::spare2); }
void set_spare1() { set(types::spare1); }
private: private:
types type_; types type_;
scg_cfg_r12_ies_s c; scg_cfg_r12_ies_s c;
}; };
typedef c1_or_crit_ext_e types; using types = c1_or_crit_ext_e;
// choice methods // choice methods
crit_exts_c_() = default; crit_exts_c_() = default;
crit_exts_c_(const crit_exts_c_& other);
crit_exts_c_& operator=(const crit_exts_c_& other);
~crit_exts_c_() { destroy_(); }
void set(types::options e = types::nulltype); void set(types::options e = types::nulltype);
types type() const { return type_; } types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -172,24 +176,23 @@ struct scg_cfg_r12_s {
c1_c_& c1() c1_c_& c1()
{ {
assert_choice_type("c1", type_.to_string(), "criticalExtensions"); assert_choice_type("c1", type_.to_string(), "criticalExtensions");
return c.get<c1_c_>(); return c;
} }
const c1_c_& c1() const const c1_c_& c1() const
{ {
assert_choice_type("c1", type_.to_string(), "criticalExtensions"); assert_choice_type("c1", type_.to_string(), "criticalExtensions");
return c.get<c1_c_>(); return c;
} }
c1_c_& set_c1() c1_c_& set_c1()
{ {
set(types::c1); set(types::c1);
return c.get<c1_c_>(); return c;
} }
void set_crit_exts_future() { set(types::crit_exts_future); }
private: private:
types type_; types type_;
choice_buffer_t<c1_c_> c; c1_c_ c;
void destroy_();
}; };
// member variables // member variables
@ -468,18 +471,22 @@ struct ho_cmd_s {
set(types::ho_cmd_r8); set(types::ho_cmd_r8);
return c; return c;
} }
void set_spare7() { set(types::spare7); }
void set_spare6() { set(types::spare6); }
void set_spare5() { set(types::spare5); }
void set_spare4() { set(types::spare4); }
void set_spare3() { set(types::spare3); }
void set_spare2() { set(types::spare2); }
void set_spare1() { set(types::spare1); }
private: private:
types type_; types type_;
ho_cmd_r8_ies_s c; ho_cmd_r8_ies_s c;
}; };
typedef c1_or_crit_ext_e types; using types = c1_or_crit_ext_e;
// choice methods // choice methods
crit_exts_c_() = default; crit_exts_c_() = default;
crit_exts_c_(const crit_exts_c_& other);
crit_exts_c_& operator=(const crit_exts_c_& other);
~crit_exts_c_() { destroy_(); }
void set(types::options e = types::nulltype); void set(types::options e = types::nulltype);
types type() const { return type_; } types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -489,24 +496,23 @@ struct ho_cmd_s {
c1_c_& c1() c1_c_& c1()
{ {
assert_choice_type("c1", type_.to_string(), "criticalExtensions"); assert_choice_type("c1", type_.to_string(), "criticalExtensions");
return c.get<c1_c_>(); return c;
} }
const c1_c_& c1() const const c1_c_& c1() const
{ {
assert_choice_type("c1", type_.to_string(), "criticalExtensions"); assert_choice_type("c1", type_.to_string(), "criticalExtensions");
return c.get<c1_c_>(); return c;
} }
c1_c_& set_c1() c1_c_& set_c1()
{ {
set(types::c1); set(types::c1);
return c.get<c1_c_>(); return c;
} }
void set_crit_exts_future() { set(types::crit_exts_future); }
private: private:
types type_; types type_;
choice_buffer_t<c1_c_> c; c1_c_ c;
void destroy_();
}; };
// member variables // member variables
@ -572,31 +578,6 @@ struct ho_prep_info_v1320_ies_s {
void to_json(json_writer& j) const; void to_json(json_writer& j) const;
}; };
// HandoverPreparationInformation-v13c0-IEs ::= SEQUENCE
struct ho_prep_info_v13c0_ies_s {
bool as_cfg_v13c0_present = false;
bool non_crit_ext_present = false;
as_cfg_v13c0_s as_cfg_v13c0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// HandoverPreparationInformation-v10x0-IEs ::= SEQUENCE
struct ho_prep_info_v10x0_ies_s {
bool late_non_crit_ext_present = false;
bool non_crit_ext_present = false;
dyn_octstring late_non_crit_ext;
ho_prep_info_v13c0_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// HandoverPreparationInformation-v1250-IEs ::= SEQUENCE // HandoverPreparationInformation-v1250-IEs ::= SEQUENCE
struct ho_prep_info_v1250_ies_s { struct ho_prep_info_v1250_ies_s {
bool ue_supported_earfcn_r12_present = false; bool ue_supported_earfcn_r12_present = false;
@ -612,19 +593,6 @@ struct ho_prep_info_v1250_ies_s {
void to_json(json_writer& j) const; void to_json(json_writer& j) const;
}; };
// HandoverPreparationInformation-v10j0-IEs ::= SEQUENCE
struct ho_prep_info_v10j0_ies_s {
bool as_cfg_v10j0_present = false;
bool non_crit_ext_present = false;
as_cfg_v10j0_s as_cfg_v10j0;
ho_prep_info_v10x0_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// HandoverPreparationInformation-v1130-IEs ::= SEQUENCE // HandoverPreparationInformation-v1130-IEs ::= SEQUENCE
struct ho_prep_info_v1130_ies_s { struct ho_prep_info_v1130_ies_s {
bool as_context_v1130_present = false; bool as_context_v1130_present = false;
@ -651,19 +619,6 @@ struct ho_prep_info_v9e0_ies_s {
void to_json(json_writer& j) const; void to_json(json_writer& j) const;
}; };
// HandoverPreparationInformation-v9j0-IEs ::= SEQUENCE
struct ho_prep_info_v9j0_ies_s {
bool late_non_crit_ext_present = false;
bool non_crit_ext_present = false;
dyn_octstring late_non_crit_ext;
ho_prep_info_v10j0_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// HandoverPreparationInformation-v9d0-IEs ::= SEQUENCE // HandoverPreparationInformation-v9d0-IEs ::= SEQUENCE
struct ho_prep_info_v9d0_ies_s { struct ho_prep_info_v9d0_ies_s {
bool late_non_crit_ext_present = false; bool late_non_crit_ext_present = false;
@ -841,18 +796,22 @@ struct ho_prep_info_s {
set(types::ho_prep_info_r8); set(types::ho_prep_info_r8);
return c; return c;
} }
void set_spare7() { set(types::spare7); }
void set_spare6() { set(types::spare6); }
void set_spare5() { set(types::spare5); }
void set_spare4() { set(types::spare4); }
void set_spare3() { set(types::spare3); }
void set_spare2() { set(types::spare2); }
void set_spare1() { set(types::spare1); }
private: private:
types type_; types type_;
ho_prep_info_r8_ies_s c; ho_prep_info_r8_ies_s c;
}; };
typedef c1_or_crit_ext_e types; using types = c1_or_crit_ext_e;
// choice methods // choice methods
crit_exts_c_() = default; crit_exts_c_() = default;
crit_exts_c_(const crit_exts_c_& other);
crit_exts_c_& operator=(const crit_exts_c_& other);
~crit_exts_c_() { destroy_(); }
void set(types::options e = types::nulltype); void set(types::options e = types::nulltype);
types type() const { return type_; } types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -862,24 +821,23 @@ struct ho_prep_info_s {
c1_c_& c1() c1_c_& c1()
{ {
assert_choice_type("c1", type_.to_string(), "criticalExtensions"); assert_choice_type("c1", type_.to_string(), "criticalExtensions");
return c.get<c1_c_>(); return c;
} }
const c1_c_& c1() const const c1_c_& c1() const
{ {
assert_choice_type("c1", type_.to_string(), "criticalExtensions"); assert_choice_type("c1", type_.to_string(), "criticalExtensions");
return c.get<c1_c_>(); return c;
} }
c1_c_& set_c1() c1_c_& set_c1()
{ {
set(types::c1); set(types::c1);
return c.get<c1_c_>(); return c;
} }
void set_crit_exts_future() { set(types::crit_exts_future); }
private: private:
types type_; types type_;
choice_buffer_t<c1_c_> c; c1_c_ c;
void destroy_();
}; };
// member variables // member variables
@ -891,6 +849,57 @@ struct ho_prep_info_s {
void to_json(json_writer& j) const; void to_json(json_writer& j) const;
}; };
// HandoverPreparationInformation-v13c0-IEs ::= SEQUENCE
struct ho_prep_info_v13c0_ies_s {
bool as_cfg_v13c0_present = false;
bool non_crit_ext_present = false;
as_cfg_v13c0_s as_cfg_v13c0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// HandoverPreparationInformation-v10x0-IEs ::= SEQUENCE
struct ho_prep_info_v10x0_ies_s {
bool late_non_crit_ext_present = false;
bool non_crit_ext_present = false;
dyn_octstring late_non_crit_ext;
ho_prep_info_v13c0_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// HandoverPreparationInformation-v10j0-IEs ::= SEQUENCE
struct ho_prep_info_v10j0_ies_s {
bool as_cfg_v10j0_present = false;
bool non_crit_ext_present = false;
as_cfg_v10j0_s as_cfg_v10j0;
ho_prep_info_v10x0_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// HandoverPreparationInformation-v9j0-IEs ::= SEQUENCE
struct ho_prep_info_v9j0_ies_s {
bool late_non_crit_ext_present = false;
bool non_crit_ext_present = false;
dyn_octstring late_non_crit_ext;
ho_prep_info_v10j0_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// VarMeasConfig ::= SEQUENCE // VarMeasConfig ::= SEQUENCE
struct var_meas_cfg_s { struct var_meas_cfg_s {
struct speed_state_pars_c_ { struct speed_state_pars_c_ {
@ -898,7 +907,7 @@ struct var_meas_cfg_s {
mob_state_params_s mob_state_params; mob_state_params_s mob_state_params;
speed_state_scale_factors_s time_to_trigger_sf; speed_state_scale_factors_s time_to_trigger_sf;
}; };
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
speed_state_pars_c_() = default; speed_state_pars_c_() = default;
@ -918,6 +927,7 @@ struct var_meas_cfg_s {
assert_choice_type("setup", type_.to_string(), "speedStatePars"); assert_choice_type("setup", type_.to_string(), "speedStatePars");
return c; return c;
} }
void set_release() { set(types::release); }
setup_s_& set_setup() setup_s_& set_setup()
{ {
set(types::setup); set(types::setup);

@ -708,7 +708,7 @@ using alt_ttt_cells_to_add_mod_list_r12_l = dyn_array<alt_ttt_cells_to_add_mod_r
// BT-NameListConfig-r15 ::= CHOICE // BT-NameListConfig-r15 ::= CHOICE
struct bt_name_list_cfg_r15_c { struct bt_name_list_cfg_r15_c {
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
bt_name_list_cfg_r15_c() = default; bt_name_list_cfg_r15_c() = default;
@ -730,6 +730,7 @@ struct bt_name_list_cfg_r15_c {
assert_choice_type("setup", type_.to_string(), "BT-NameListConfig-r15"); assert_choice_type("setup", type_.to_string(), "BT-NameListConfig-r15");
return c; return c;
} }
void set_release() { set(types::release); }
bt_name_list_r15_l& set_setup() bt_name_list_r15_l& set_setup()
{ {
set(types::setup); set(types::setup);
@ -942,7 +943,7 @@ struct meas_ds_cfg_r12_c {
meas_csi_rs_to_add_mod_list_r12_l meas_csi_rs_to_add_mod_list_r12; meas_csi_rs_to_add_mod_list_r12_l meas_csi_rs_to_add_mod_list_r12;
// ... // ...
}; };
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
meas_ds_cfg_r12_c() = default; meas_ds_cfg_r12_c() = default;
@ -964,6 +965,7 @@ struct meas_ds_cfg_r12_c {
assert_choice_type("setup", type_.to_string(), "MeasDS-Config-r12"); assert_choice_type("setup", type_.to_string(), "MeasDS-Config-r12");
return c; return c;
} }
void set_release() { set(types::release); }
setup_s_& set_setup() setup_s_& set_setup()
{ {
set(types::setup); set(types::setup);
@ -1331,7 +1333,7 @@ struct meas_gap_cfg_c {
// member variables // member variables
gap_offset_c_ gap_offset; gap_offset_c_ gap_offset;
}; };
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
meas_gap_cfg_c() = default; meas_gap_cfg_c() = default;
@ -1351,6 +1353,7 @@ struct meas_gap_cfg_c {
assert_choice_type("setup", type_.to_string(), "MeasGapConfig"); assert_choice_type("setup", type_.to_string(), "MeasGapConfig");
return c; return c;
} }
void set_release() { set(types::release); }
setup_s_& set_setup() setup_s_& set_setup()
{ {
set(types::setup); set(types::setup);
@ -1407,7 +1410,7 @@ struct meas_sf_pattern_cfg_neigh_r10_c {
meas_sf_pattern_r10_c meas_sf_pattern_neigh_r10; meas_sf_pattern_r10_c meas_sf_pattern_neigh_r10;
meas_sf_cell_list_r10_l meas_sf_cell_list_r10; meas_sf_cell_list_r10_l meas_sf_cell_list_r10;
}; };
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
meas_sf_pattern_cfg_neigh_r10_c() = default; meas_sf_pattern_cfg_neigh_r10_c() = default;
@ -1429,6 +1432,7 @@ struct meas_sf_pattern_cfg_neigh_r10_c {
assert_choice_type("setup", type_.to_string(), "MeasSubframePatternConfigNeigh-r10"); assert_choice_type("setup", type_.to_string(), "MeasSubframePatternConfigNeigh-r10");
return c; return c;
} }
void set_release() { set(types::release); }
setup_s_& set_setup() setup_s_& set_setup()
{ {
set(types::setup); set(types::setup);
@ -1498,7 +1502,7 @@ struct rmtc_cfg_r13_c {
meas_dur_r13_e_ meas_dur_r13; meas_dur_r13_e_ meas_dur_r13;
// ... // ...
}; };
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
rmtc_cfg_r13_c() = default; rmtc_cfg_r13_c() = default;
@ -1520,6 +1524,7 @@ struct rmtc_cfg_r13_c {
assert_choice_type("setup", type_.to_string(), "RMTC-Config-r13"); assert_choice_type("setup", type_.to_string(), "RMTC-Config-r13");
return c; return c;
} }
void set_release() { set(types::release); }
setup_s_& set_setup() setup_s_& set_setup()
{ {
set(types::setup); set(types::setup);
@ -1542,7 +1547,7 @@ struct rs_cfg_ssb_nr_r15_s {
}; };
typedef enumerated<subcarrier_spacing_ssb_r15_opts> subcarrier_spacing_ssb_r15_e_; typedef enumerated<subcarrier_spacing_ssb_r15_opts> subcarrier_spacing_ssb_r15_e_;
struct ssb_to_measure_r15_c_ { struct ssb_to_measure_r15_c_ {
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
ssb_to_measure_r15_c_() = default; ssb_to_measure_r15_c_() = default;
@ -1564,6 +1569,7 @@ struct rs_cfg_ssb_nr_r15_s {
assert_choice_type("setup", type_.to_string(), "ssb-ToMeasure-r15"); assert_choice_type("setup", type_.to_string(), "ssb-ToMeasure-r15");
return c; return c;
} }
void set_release() { set(types::release); }
ssb_to_measure_r15_c& set_setup() ssb_to_measure_r15_c& set_setup()
{ {
set(types::setup); set(types::setup);
@ -1593,7 +1599,7 @@ struct rs_cfg_ssb_nr_r15_s {
// RSRQ-RangeConfig-r12 ::= CHOICE // RSRQ-RangeConfig-r12 ::= CHOICE
struct rsrq_range_cfg_r12_c { struct rsrq_range_cfg_r12_c {
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
rsrq_range_cfg_r12_c() = default; rsrq_range_cfg_r12_c() = default;
@ -1615,6 +1621,7 @@ struct rsrq_range_cfg_r12_c {
assert_choice_type("setup", type_.to_string(), "RSRQ-RangeConfig-r12"); assert_choice_type("setup", type_.to_string(), "RSRQ-RangeConfig-r12");
return c; return c;
} }
void set_release() { set(types::release); }
int8_t& set_setup() int8_t& set_setup()
{ {
set(types::setup); set(types::setup);
@ -1949,7 +1956,7 @@ struct ul_delay_cfg_r13_c {
// member variables // member variables
delay_thres_r13_e_ delay_thres_r13; delay_thres_r13_e_ delay_thres_r13;
}; };
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
ul_delay_cfg_r13_c() = default; ul_delay_cfg_r13_c() = default;
@ -1971,6 +1978,7 @@ struct ul_delay_cfg_r13_c {
assert_choice_type("setup", type_.to_string(), "UL-DelayConfig-r13"); assert_choice_type("setup", type_.to_string(), "UL-DelayConfig-r13");
return c; return c;
} }
void set_release() { set(types::release); }
setup_s_& set_setup() setup_s_& set_setup()
{ {
set(types::setup); set(types::setup);
@ -2014,7 +2022,7 @@ using wlan_id_list_r13_l = dyn_array<wlan_ids_r12_s>;
// WLAN-NameListConfig-r15 ::= CHOICE // WLAN-NameListConfig-r15 ::= CHOICE
struct wlan_name_list_cfg_r15_c { struct wlan_name_list_cfg_r15_c {
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
wlan_name_list_cfg_r15_c() = default; wlan_name_list_cfg_r15_c() = default;
@ -2036,6 +2044,7 @@ struct wlan_name_list_cfg_r15_c {
assert_choice_type("setup", type_.to_string(), "WLAN-NameListConfig-r15"); assert_choice_type("setup", type_.to_string(), "WLAN-NameListConfig-r15");
return c; return c;
} }
void set_release() { set(types::release); }
wlan_name_list_r15_l& set_setup() wlan_name_list_r15_l& set_setup()
{ {
set(types::setup); set(types::setup);
@ -2097,7 +2106,7 @@ struct meas_obj_eutra_s {
uint16_t to_number() const; uint16_t to_number() const;
}; };
typedef enumerated<setup_opts> setup_e_; typedef enumerated<setup_opts> setup_e_;
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
t312_r12_c_() = default; t312_r12_c_() = default;
@ -2119,6 +2128,7 @@ struct meas_obj_eutra_s {
assert_choice_type("setup", type_.to_string(), "t312-r12"); assert_choice_type("setup", type_.to_string(), "t312-r12");
return c; return c;
} }
void set_release() { set(types::release); }
setup_e_& set_setup() setup_e_& set_setup()
{ {
set(types::setup); set(types::setup);
@ -2219,7 +2229,7 @@ struct meas_obj_geran_s {
struct meas_obj_nr_r15_s { struct meas_obj_nr_r15_s {
using cells_for_which_to_report_sftd_r15_l_ = bounded_array<uint16_t, 3>; using cells_for_which_to_report_sftd_r15_l_ = bounded_array<uint16_t, 3>;
struct band_nr_r15_c_ { struct band_nr_r15_c_ {
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
band_nr_r15_c_() = default; band_nr_r15_c_() = default;
@ -2241,6 +2251,7 @@ struct meas_obj_nr_r15_s {
assert_choice_type("setup", type_.to_string(), "bandNR-r15"); assert_choice_type("setup", type_.to_string(), "bandNR-r15");
return c; return c;
} }
void set_release() { set(types::release); }
uint16_t& set_setup() uint16_t& set_setup()
{ {
set(types::setup); set(types::setup);
@ -2823,7 +2834,7 @@ struct eutra_event_s {
// ReportConfigEUTRA ::= SEQUENCE // ReportConfigEUTRA ::= SEQUENCE
struct report_cfg_eutra_s { struct report_cfg_eutra_s {
struct trigger_type_c_ { struct trigger_type_c_ {
typedef eutra_event_s event_s_; using event_s_ = eutra_event_s;
struct periodical_s_ { struct periodical_s_ {
struct purpose_opts { struct purpose_opts {
enum options { report_strongest_cells, report_cgi, nulltype } value; enum options { report_strongest_cells, report_cgi, nulltype } value;
@ -2913,7 +2924,7 @@ struct report_cfg_eutra_s {
}; };
typedef enumerated<report_amount_opts> report_amount_e_; typedef enumerated<report_amount_opts> report_amount_e_;
struct alt_time_to_trigger_r12_c_ { struct alt_time_to_trigger_r12_c_ {
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
alt_time_to_trigger_r12_c_() = default; alt_time_to_trigger_r12_c_() = default;
@ -2935,6 +2946,7 @@ struct report_cfg_eutra_s {
assert_choice_type("setup", type_.to_string(), "alternativeTimeToTrigger-r12"); assert_choice_type("setup", type_.to_string(), "alternativeTimeToTrigger-r12");
return c; return c;
} }
void set_release() { set(types::release); }
time_to_trigger_e& set_setup() time_to_trigger_e& set_setup()
{ {
set(types::setup); set(types::setup);
@ -2962,7 +2974,7 @@ struct report_cfg_eutra_s {
uint8_t a5_thres2_r13 = 0; uint8_t a5_thres2_r13 = 0;
report_quant_v1310_e_ report_quant_v1310; report_quant_v1310_e_ report_quant_v1310;
}; };
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
rs_sinr_cfg_r13_c_() = default; rs_sinr_cfg_r13_c_() = default;
@ -2984,6 +2996,7 @@ struct report_cfg_eutra_s {
assert_choice_type("setup", type_.to_string(), "rs-sinr-Config-r13"); assert_choice_type("setup", type_.to_string(), "rs-sinr-Config-r13");
return c; return c;
} }
void set_release() { set(types::release); }
setup_s_& set_setup() setup_s_& set_setup()
{ {
set(types::setup); set(types::setup);
@ -3478,7 +3491,7 @@ struct report_cfg_inter_rat_s {
}; };
typedef enumerated<report_amount_opts> report_amount_e_; typedef enumerated<report_amount_opts> report_amount_e_;
struct b2_thres1_v1250_c_ { struct b2_thres1_v1250_c_ {
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
b2_thres1_v1250_c_() = default; b2_thres1_v1250_c_() = default;
@ -3500,6 +3513,7 @@ struct report_cfg_inter_rat_s {
assert_choice_type("setup", type_.to_string(), "b2-Threshold1-v1250"); assert_choice_type("setup", type_.to_string(), "b2-Threshold1-v1250");
return c; return c;
} }
void set_release() { set(types::release); }
int8_t& set_setup() int8_t& set_setup()
{ {
set(types::setup); set(types::setup);
@ -4480,7 +4494,7 @@ struct meas_gap_cfg_dense_prs_r15_c {
// member variables // member variables
gap_offset_dense_prs_r15_c_ gap_offset_dense_prs_r15; gap_offset_dense_prs_r15_c_ gap_offset_dense_prs_r15;
}; };
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
meas_gap_cfg_dense_prs_r15_c() = default; meas_gap_cfg_dense_prs_r15_c() = default;
@ -4500,6 +4514,7 @@ struct meas_gap_cfg_dense_prs_r15_c {
assert_choice_type("setup", type_.to_string(), "MeasGapConfigDensePRS-r15"); assert_choice_type("setup", type_.to_string(), "MeasGapConfigDensePRS-r15");
return c; return c;
} }
void set_release() { set(types::release); }
setup_s_& set_setup() setup_s_& set_setup()
{ {
set(types::setup); set(types::setup);
@ -4519,7 +4534,7 @@ struct meas_gap_cfg_per_cc_list_r14_c {
meas_gap_cfg_to_rem_list_r14_l meas_gap_cfg_to_rem_list_r14; 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; meas_gap_cfg_to_add_mod_list_r14_l meas_gap_cfg_to_add_mod_list_r14;
}; };
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
meas_gap_cfg_per_cc_list_r14_c() = default; meas_gap_cfg_per_cc_list_r14_c() = default;
@ -4539,6 +4554,7 @@ struct meas_gap_cfg_per_cc_list_r14_c {
assert_choice_type("setup", type_.to_string(), "MeasGapConfigPerCC-List-r14"); assert_choice_type("setup", type_.to_string(), "MeasGapConfigPerCC-List-r14");
return c; return c;
} }
void set_release() { set(types::release); }
setup_s_& set_setup() setup_s_& set_setup()
{ {
set(types::setup); set(types::setup);
@ -4566,7 +4582,7 @@ struct meas_gap_sharing_cfg_r14_c {
// member variables // member variables
meas_gap_sharing_scheme_r14_e_ meas_gap_sharing_scheme_r14; meas_gap_sharing_scheme_r14_e_ meas_gap_sharing_scheme_r14;
}; };
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
meas_gap_sharing_cfg_r14_c() = default; meas_gap_sharing_cfg_r14_c() = default;
@ -4586,6 +4602,7 @@ struct meas_gap_sharing_cfg_r14_c {
assert_choice_type("setup", type_.to_string(), "MeasGapSharingConfig-r14"); assert_choice_type("setup", type_.to_string(), "MeasGapSharingConfig-r14");
return c; return c;
} }
void set_release() { set(types::release); }
setup_s_& set_setup() setup_s_& set_setup()
{ {
set(types::setup); set(types::setup);
@ -4724,6 +4741,9 @@ struct rach_skip_r14_s {
assert_choice_type("scg-STAG-r14", type_.to_string(), "targetTA-r14"); assert_choice_type("scg-STAG-r14", type_.to_string(), "targetTA-r14");
return c.get<uint8_t>(); return c.get<uint8_t>();
} }
void set_ta0_r14() { set(types::ta0_r14); }
void set_mcg_ptag_r14() { set(types::mcg_ptag_r14); }
void set_scg_ptag_r14() { set(types::scg_ptag_r14); }
uint8_t& set_mcg_stag_r14() uint8_t& set_mcg_stag_r14()
{ {
set(types::mcg_stag_r14); set(types::mcg_stag_r14);
@ -4782,7 +4802,7 @@ struct meas_cfg_s {
mob_state_params_s mob_state_params; mob_state_params_s mob_state_params;
speed_state_scale_factors_s time_to_trigger_sf; speed_state_scale_factors_s time_to_trigger_sf;
}; };
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
speed_state_pars_c_() = default; speed_state_pars_c_() = default;
@ -4802,6 +4822,7 @@ struct meas_cfg_s {
assert_choice_type("setup", type_.to_string(), "speedStatePars"); assert_choice_type("setup", type_.to_string(), "speedStatePars");
return c; return c;
} }
void set_release() { set(types::release); }
setup_s_& set_setup() setup_s_& set_setup()
{ {
set(types::setup); set(types::setup);
@ -4813,7 +4834,7 @@ struct meas_cfg_s {
setup_s_ c; setup_s_ c;
}; };
struct meas_scale_factor_r12_c_ { struct meas_scale_factor_r12_c_ {
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
meas_scale_factor_r12_c_() = default; meas_scale_factor_r12_c_() = default;
@ -4833,6 +4854,7 @@ struct meas_cfg_s {
assert_choice_type("setup", type_.to_string(), "measScaleFactor-r12"); assert_choice_type("setup", type_.to_string(), "measScaleFactor-r12");
return c; return c;
} }
void set_release() { set(types::release); }
meas_scale_factor_r12_e& set_setup() meas_scale_factor_r12_e& set_setup()
{ {
set(types::setup); set(types::setup);
@ -4844,7 +4866,7 @@ struct meas_cfg_s {
meas_scale_factor_r12_e c; meas_scale_factor_r12_e c;
}; };
struct height_thresh_ref_r15_c_ { struct height_thresh_ref_r15_c_ {
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
height_thresh_ref_r15_c_() = default; height_thresh_ref_r15_c_() = default;
@ -4864,6 +4886,7 @@ struct meas_cfg_s {
assert_choice_type("setup", type_.to_string(), "heightThreshRef-r15"); assert_choice_type("setup", type_.to_string(), "heightThreshRef-r15");
return c; return c;
} }
void set_release() { set(types::release); }
uint8_t& set_setup() uint8_t& set_setup()
{ {
set(types::setup); set(types::setup);
@ -4945,17 +4968,6 @@ struct carrier_freq_geran_s {
void to_json(json_writer& j) const; void to_json(json_writer& j) const;
}; };
// MobilityControlInfo-v10l0 ::= SEQUENCE
struct mob_ctrl_info_v10l0_s {
bool add_spec_emission_v10l0_present = false;
uint16_t add_spec_emission_v10l0 = 33;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// LoggedMeasurementConfiguration-v1530-IEs ::= SEQUENCE // LoggedMeasurementConfiguration-v1530-IEs ::= SEQUENCE
struct logged_meas_cfg_v1530_ies_s { struct logged_meas_cfg_v1530_ies_s {
bool bt_name_list_r15_present = false; bool bt_name_list_r15_present = false;
@ -6581,18 +6593,22 @@ struct meas_report_s {
set(types::meas_report_r8); set(types::meas_report_r8);
return c; return c;
} }
void set_spare7() { set(types::spare7); }
void set_spare6() { set(types::spare6); }
void set_spare5() { set(types::spare5); }
void set_spare4() { set(types::spare4); }
void set_spare3() { set(types::spare3); }
void set_spare2() { set(types::spare2); }
void set_spare1() { set(types::spare1); }
private: private:
types type_; types type_;
meas_report_r8_ies_s c; meas_report_r8_ies_s c;
}; };
typedef c1_or_crit_ext_e types; using types = c1_or_crit_ext_e;
// choice methods // choice methods
crit_exts_c_() = default; crit_exts_c_() = default;
crit_exts_c_(const crit_exts_c_& other);
crit_exts_c_& operator=(const crit_exts_c_& other);
~crit_exts_c_() { destroy_(); }
void set(types::options e = types::nulltype); void set(types::options e = types::nulltype);
types type() const { return type_; } types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -6602,24 +6618,23 @@ struct meas_report_s {
c1_c_& c1() c1_c_& c1()
{ {
assert_choice_type("c1", type_.to_string(), "criticalExtensions"); assert_choice_type("c1", type_.to_string(), "criticalExtensions");
return c.get<c1_c_>(); return c;
} }
const c1_c_& c1() const const c1_c_& c1() const
{ {
assert_choice_type("c1", type_.to_string(), "criticalExtensions"); assert_choice_type("c1", type_.to_string(), "criticalExtensions");
return c.get<c1_c_>(); return c;
} }
c1_c_& set_c1() c1_c_& set_c1()
{ {
set(types::c1); set(types::c1);
return c.get<c1_c_>(); return c;
} }
void set_crit_exts_future() { set(types::crit_exts_future); }
private: private:
types type_; types type_;
choice_buffer_t<c1_c_> c; c1_c_ c;
void destroy_();
}; };
// member variables // member variables
@ -6631,6 +6646,17 @@ struct meas_report_s {
void to_json(json_writer& j) const; void to_json(json_writer& j) const;
}; };
// MobilityControlInfo-v10l0 ::= SEQUENCE
struct mob_ctrl_info_v10l0_s {
bool add_spec_emission_v10l0_present = false;
uint16_t add_spec_emission_v10l0 = 33;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
} // namespace rrc } // namespace rrc
} // namespace asn1 } // namespace asn1

@ -274,9 +274,6 @@ struct pcch_msg_type_c {
// choice methods // choice methods
pcch_msg_type_c() = default; pcch_msg_type_c() = default;
pcch_msg_type_c(const pcch_msg_type_c& other);
pcch_msg_type_c& operator=(const pcch_msg_type_c& other);
~pcch_msg_type_c() { destroy_(); }
void set(types::options e = types::nulltype); void set(types::options e = types::nulltype);
types type() const { return type_; } types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -286,24 +283,23 @@ struct pcch_msg_type_c {
c1_c_& c1() c1_c_& c1()
{ {
assert_choice_type("c1", type_.to_string(), "PCCH-MessageType"); assert_choice_type("c1", type_.to_string(), "PCCH-MessageType");
return c.get<c1_c_>(); return c;
} }
const c1_c_& c1() const const c1_c_& c1() const
{ {
assert_choice_type("c1", type_.to_string(), "PCCH-MessageType"); assert_choice_type("c1", type_.to_string(), "PCCH-MessageType");
return c.get<c1_c_>(); return c;
} }
c1_c_& set_c1() c1_c_& set_c1()
{ {
set(types::c1); set(types::c1);
return c.get<c1_c_>(); return c;
} }
void set_msg_class_ext() { set(types::msg_class_ext); }
private: private:
types type_; types type_;
choice_buffer_t<c1_c_> c; c1_c_ c;
void destroy_();
}; };
// PCCH-Message ::= SEQUENCE // PCCH-Message ::= SEQUENCE
@ -372,18 +368,22 @@ struct ue_paging_coverage_info_s {
set(types::ue_paging_coverage_info_r13); set(types::ue_paging_coverage_info_r13);
return c; return c;
} }
void set_spare7() { set(types::spare7); }
void set_spare6() { set(types::spare6); }
void set_spare5() { set(types::spare5); }
void set_spare4() { set(types::spare4); }
void set_spare3() { set(types::spare3); }
void set_spare2() { set(types::spare2); }
void set_spare1() { set(types::spare1); }
private: private:
types type_; types type_;
ue_paging_coverage_info_r13_ies_s c; ue_paging_coverage_info_r13_ies_s c;
}; };
typedef c1_or_crit_ext_e types; using types = c1_or_crit_ext_e;
// choice methods // choice methods
crit_exts_c_() = default; crit_exts_c_() = default;
crit_exts_c_(const crit_exts_c_& other);
crit_exts_c_& operator=(const crit_exts_c_& other);
~crit_exts_c_() { destroy_(); }
void set(types::options e = types::nulltype); void set(types::options e = types::nulltype);
types type() const { return type_; } types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -393,24 +393,23 @@ struct ue_paging_coverage_info_s {
c1_c_& c1() c1_c_& c1()
{ {
assert_choice_type("c1", type_.to_string(), "criticalExtensions"); assert_choice_type("c1", type_.to_string(), "criticalExtensions");
return c.get<c1_c_>(); return c;
} }
const c1_c_& c1() const const c1_c_& c1() const
{ {
assert_choice_type("c1", type_.to_string(), "criticalExtensions"); assert_choice_type("c1", type_.to_string(), "criticalExtensions");
return c.get<c1_c_>(); return c;
} }
c1_c_& set_c1() c1_c_& set_c1()
{ {
set(types::c1); set(types::c1);
return c.get<c1_c_>(); return c;
} }
void set_crit_exts_future() { set(types::crit_exts_future); }
private: private:
types type_; types type_;
choice_buffer_t<c1_c_> c; c1_c_ c;
void destroy_();
}; };
// member variables // member variables
@ -493,18 +492,22 @@ struct ue_radio_paging_info_s {
set(types::ue_radio_paging_info_r12); set(types::ue_radio_paging_info_r12);
return c; return c;
} }
void set_spare7() { set(types::spare7); }
void set_spare6() { set(types::spare6); }
void set_spare5() { set(types::spare5); }
void set_spare4() { set(types::spare4); }
void set_spare3() { set(types::spare3); }
void set_spare2() { set(types::spare2); }
void set_spare1() { set(types::spare1); }
private: private:
types type_; types type_;
ue_radio_paging_info_r12_ies_s c; ue_radio_paging_info_r12_ies_s c;
}; };
typedef c1_or_crit_ext_e types; using types = c1_or_crit_ext_e;
// choice methods // choice methods
crit_exts_c_() = default; crit_exts_c_() = default;
crit_exts_c_(const crit_exts_c_& other);
crit_exts_c_& operator=(const crit_exts_c_& other);
~crit_exts_c_() { destroy_(); }
void set(types::options e = types::nulltype); void set(types::options e = types::nulltype);
types type() const { return type_; } types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -514,24 +517,23 @@ struct ue_radio_paging_info_s {
c1_c_& c1() c1_c_& c1()
{ {
assert_choice_type("c1", type_.to_string(), "criticalExtensions"); assert_choice_type("c1", type_.to_string(), "criticalExtensions");
return c.get<c1_c_>(); return c;
} }
const c1_c_& c1() const const c1_c_& c1() const
{ {
assert_choice_type("c1", type_.to_string(), "criticalExtensions"); assert_choice_type("c1", type_.to_string(), "criticalExtensions");
return c.get<c1_c_>(); return c;
} }
c1_c_& set_c1() c1_c_& set_c1()
{ {
set(types::c1); set(types::c1);
return c.get<c1_c_>(); return c;
} }
void set_crit_exts_future() { set(types::crit_exts_future); }
private: private:
types type_; types type_;
choice_buffer_t<c1_c_> c; c1_c_ c;
void destroy_();
}; };
// member variables // member variables

File diff suppressed because it is too large Load Diff

@ -293,47 +293,6 @@ struct tdd_cfg_v1130_s {
bool operator!=(const tdd_cfg_v1130_s& other) const { return not(*this == other); } bool operator!=(const tdd_cfg_v1130_s& other) const { return not(*this == other); }
}; };
// UplinkPowerControlCommon-v1310 ::= SEQUENCE
struct ul_pwr_ctrl_common_v1310_s {
struct delta_f_pucch_format4_r13_opts {
enum options {
delta_f16,
delta_f15,
delta_f14,
delta_f13,
delta_f12,
delta_f11,
delta_f10,
spare1,
nulltype
} value;
typedef uint8_t number_type;
std::string to_string() const;
uint8_t to_number() const;
};
typedef enumerated<delta_f_pucch_format4_r13_opts> delta_f_pucch_format4_r13_e_;
struct delta_f_pucch_format5_minus13_opts {
enum options { delta_f13, delta_f12, delta_f11, delta_f10, delta_f9, delta_f8, delta_f7, spare1, nulltype } value;
typedef uint8_t number_type;
std::string to_string() const;
uint8_t to_number() const;
};
typedef enumerated<delta_f_pucch_format5_minus13_opts> delta_f_pucch_format5_minus13_e_;
// member variables
bool delta_f_pucch_format4_r13_present = false;
bool delta_f_pucch_format5_minus13_present = false;
delta_f_pucch_format4_r13_e_ delta_f_pucch_format4_r13;
delta_f_pucch_format5_minus13_e_ delta_f_pucch_format5_minus13;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// PRACH-ParametersCE-r13 ::= SEQUENCE // PRACH-ParametersCE-r13 ::= SEQUENCE
struct prach_params_ce_r13_s { struct prach_params_ce_r13_s {
struct prach_start_sf_r13_opts { struct prach_start_sf_r13_opts {
@ -700,7 +659,7 @@ struct delta_flist_spucch_r15_c {
delta_f_subslot_spucch_tbcc_format4_r15_e_ delta_f_subslot_spucch_tbcc_format4_r15; delta_f_subslot_spucch_tbcc_format4_r15_e_ delta_f_subslot_spucch_tbcc_format4_r15;
// ... // ...
}; };
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
delta_flist_spucch_r15_c() = default; delta_flist_spucch_r15_c() = default;
@ -722,6 +681,7 @@ struct delta_flist_spucch_r15_c {
assert_choice_type("setup", type_.to_string(), "DeltaFList-SPUCCH-r15"); assert_choice_type("setup", type_.to_string(), "DeltaFList-SPUCCH-r15");
return c; return c;
} }
void set_release() { set(types::release); }
setup_s_& set_setup() setup_s_& set_setup()
{ {
set(types::setup); set(types::setup);
@ -1861,7 +1821,7 @@ struct srs_ul_cfg_common_c {
srs_sf_cfg_e_ srs_sf_cfg; srs_sf_cfg_e_ srs_sf_cfg;
bool ack_nack_srs_simul_tx = false; bool ack_nack_srs_simul_tx = false;
}; };
typedef setup_e types; using types = setup_e;
// choice methods // choice methods
srs_ul_cfg_common_c() = default; srs_ul_cfg_common_c() = default;
@ -1883,6 +1843,7 @@ struct srs_ul_cfg_common_c {
assert_choice_type("setup", type_.to_string(), "SoundingRS-UL-ConfigCommon"); assert_choice_type("setup", type_.to_string(), "SoundingRS-UL-ConfigCommon");
return c; return c;
} }
void set_release() { set(types::release); }
setup_s_& set_setup() setup_s_& set_setup()
{ {
set(types::setup); set(types::setup);
@ -2442,6 +2403,47 @@ struct rr_cfg_common_scell_r10_s {
bool operator!=(const rr_cfg_common_scell_r10_s& other) const { return not(*this == other); } bool operator!=(const rr_cfg_common_scell_r10_s& other) const { return not(*this == other); }
}; };
// UplinkPowerControlCommon-v1310 ::= SEQUENCE
struct ul_pwr_ctrl_common_v1310_s {
struct delta_f_pucch_format4_r13_opts {
enum options {
delta_f16,
delta_f15,
delta_f14,
delta_f13,
delta_f12,
delta_f11,
delta_f10,
spare1,
nulltype
} value;
typedef uint8_t number_type;
std::string to_string() const;
uint8_t to_number() const;
};
typedef enumerated<delta_f_pucch_format4_r13_opts> delta_f_pucch_format4_r13_e_;
struct delta_f_pucch_format5_minus13_opts {
enum options { delta_f13, delta_f12, delta_f11, delta_f10, delta_f9, delta_f8, delta_f7, spare1, nulltype } value;
typedef uint8_t number_type;
std::string to_string() const;
uint8_t to_number() const;
};
typedef enumerated<delta_f_pucch_format5_minus13_opts> delta_f_pucch_format5_minus13_e_;
// member variables
bool delta_f_pucch_format4_r13_present = false;
bool delta_f_pucch_format5_minus13_present = false;
delta_f_pucch_format4_r13_e_ delta_f_pucch_format4_r13;
delta_f_pucch_format5_minus13_e_ delta_f_pucch_format5_minus13;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// PRACH-Config-v1310 ::= SEQUENCE // PRACH-Config-v1310 ::= SEQUENCE
struct prach_cfg_v1310_s { struct prach_cfg_v1310_s {
struct mpdcch_start_sf_css_ra_r13_c_ { struct mpdcch_start_sf_css_ra_r13_c_ {

File diff suppressed because it is too large Load Diff

@ -309,18 +309,18 @@ struct security_mode_cmd_s {
set(types::security_mode_cmd_r8); set(types::security_mode_cmd_r8);
return c; return c;
} }
void set_spare3() { set(types::spare3); }
void set_spare2() { set(types::spare2); }
void set_spare1() { set(types::spare1); }
private: private:
types type_; types type_;
security_mode_cmd_r8_ies_s c; security_mode_cmd_r8_ies_s c;
}; };
typedef c1_or_crit_ext_e types; using types = c1_or_crit_ext_e;
// choice methods // choice methods
crit_exts_c_() = default; crit_exts_c_() = default;
crit_exts_c_(const crit_exts_c_& other);
crit_exts_c_& operator=(const crit_exts_c_& other);
~crit_exts_c_() { destroy_(); }
void set(types::options e = types::nulltype); void set(types::options e = types::nulltype);
types type() const { return type_; } types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -330,24 +330,23 @@ struct security_mode_cmd_s {
c1_c_& c1() c1_c_& c1()
{ {
assert_choice_type("c1", type_.to_string(), "criticalExtensions"); assert_choice_type("c1", type_.to_string(), "criticalExtensions");
return c.get<c1_c_>(); return c;
} }
const c1_c_& c1() const const c1_c_& c1() const
{ {
assert_choice_type("c1", type_.to_string(), "criticalExtensions"); assert_choice_type("c1", type_.to_string(), "criticalExtensions");
return c.get<c1_c_>(); return c;
} }
c1_c_& set_c1() c1_c_& set_c1()
{ {
set(types::c1); set(types::c1);
return c.get<c1_c_>(); return c;
} }
void set_crit_exts_future() { set(types::crit_exts_future); }
private: private:
types type_; types type_;
choice_buffer_t<c1_c_> c; c1_c_ c;
void destroy_();
}; };
// member variables // member variables
@ -418,9 +417,6 @@ struct security_mode_complete_s {
// choice methods // choice methods
crit_exts_c_() = default; crit_exts_c_() = default;
crit_exts_c_(const crit_exts_c_& other);
crit_exts_c_& operator=(const crit_exts_c_& other);
~crit_exts_c_() { destroy_(); }
void set(types::options e = types::nulltype); void set(types::options e = types::nulltype);
types type() const { return type_; } types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -430,24 +426,23 @@ struct security_mode_complete_s {
security_mode_complete_r8_ies_s& security_mode_complete_r8() security_mode_complete_r8_ies_s& security_mode_complete_r8()
{ {
assert_choice_type("securityModeComplete-r8", type_.to_string(), "criticalExtensions"); assert_choice_type("securityModeComplete-r8", type_.to_string(), "criticalExtensions");
return c.get<security_mode_complete_r8_ies_s>(); return c;
} }
const security_mode_complete_r8_ies_s& security_mode_complete_r8() const const security_mode_complete_r8_ies_s& security_mode_complete_r8() const
{ {
assert_choice_type("securityModeComplete-r8", type_.to_string(), "criticalExtensions"); assert_choice_type("securityModeComplete-r8", type_.to_string(), "criticalExtensions");
return c.get<security_mode_complete_r8_ies_s>(); return c;
} }
security_mode_complete_r8_ies_s& set_security_mode_complete_r8() security_mode_complete_r8_ies_s& set_security_mode_complete_r8()
{ {
set(types::security_mode_complete_r8); set(types::security_mode_complete_r8);
return c.get<security_mode_complete_r8_ies_s>(); return c;
} }
void set_crit_exts_future() { set(types::crit_exts_future); }
private: private:
types type_; types type_;
choice_buffer_t<security_mode_complete_r8_ies_s> c; security_mode_complete_r8_ies_s c;
void destroy_();
}; };
// member variables // member variables
@ -472,9 +467,6 @@ struct security_mode_fail_s {
// choice methods // choice methods
crit_exts_c_() = default; crit_exts_c_() = default;
crit_exts_c_(const crit_exts_c_& other);
crit_exts_c_& operator=(const crit_exts_c_& other);
~crit_exts_c_() { destroy_(); }
void set(types::options e = types::nulltype); void set(types::options e = types::nulltype);
types type() const { return type_; } types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -484,24 +476,23 @@ struct security_mode_fail_s {
security_mode_fail_r8_ies_s& security_mode_fail_r8() security_mode_fail_r8_ies_s& security_mode_fail_r8()
{ {
assert_choice_type("securityModeFailure-r8", type_.to_string(), "criticalExtensions"); assert_choice_type("securityModeFailure-r8", type_.to_string(), "criticalExtensions");
return c.get<security_mode_fail_r8_ies_s>(); return c;
} }
const security_mode_fail_r8_ies_s& security_mode_fail_r8() const const security_mode_fail_r8_ies_s& security_mode_fail_r8() const
{ {
assert_choice_type("securityModeFailure-r8", type_.to_string(), "criticalExtensions"); assert_choice_type("securityModeFailure-r8", type_.to_string(), "criticalExtensions");
return c.get<security_mode_fail_r8_ies_s>(); return c;
} }
security_mode_fail_r8_ies_s& set_security_mode_fail_r8() security_mode_fail_r8_ies_s& set_security_mode_fail_r8()
{ {
set(types::security_mode_fail_r8); set(types::security_mode_fail_r8);
return c.get<security_mode_fail_r8_ies_s>(); return c;
} }
void set_crit_exts_future() { set(types::crit_exts_future); }
private: private:
types type_; types type_;
choice_buffer_t<security_mode_fail_r8_ies_s> c; security_mode_fail_r8_ies_s c;
void destroy_();
}; };
// member variables // member variables

@ -272,6 +272,7 @@ struct sib_type1_v1530_ies_s {
assert_choice_type("crs-IntfMitigNumPRBs", type_.to_string(), "crs-IntfMitigConfig-r15"); assert_choice_type("crs-IntfMitigNumPRBs", type_.to_string(), "crs-IntfMitigConfig-r15");
return c; return c;
} }
void set_crs_intf_mitig_enabled() { set(types::crs_intf_mitig_enabled); }
crs_intf_mitig_num_prbs_e_& set_crs_intf_mitig_num_prbs() crs_intf_mitig_num_prbs_e_& set_crs_intf_mitig_num_prbs()
{ {
set(types::crs_intf_mitig_num_prbs); set(types::crs_intf_mitig_num_prbs);
@ -345,9 +346,12 @@ struct cell_access_related_info_r14_s {
void to_json(json_writer& j) const; void to_json(json_writer& j) const;
}; };
// CellSelectionInfoCE1-v1360 ::= SEQUENCE // SystemInformationBlockType1-v1450-IEs ::= SEQUENCE
struct cell_sel_info_ce1_v1360_s { struct sib_type1_v1450_ies_s {
int8_t delta_rx_lev_min_ce1_v1360 = -8; bool tdd_cfg_v1450_present = false;
bool non_crit_ext_present = false;
tdd_cfg_v1450_s tdd_cfg_v1450;
sib_type1_v1530_ies_s non_crit_ext;
// sequence methods // sequence methods
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -355,22 +359,9 @@ struct cell_sel_info_ce1_v1360_s {
void to_json(json_writer& j) const; void to_json(json_writer& j) const;
}; };
// SI-Periodicity-r12 ::= ENUMERATED // CellSelectionInfoCE1-v1360 ::= SEQUENCE
struct si_periodicity_r12_opts { struct cell_sel_info_ce1_v1360_s {
enum options { rf8, rf16, rf32, rf64, rf128, rf256, rf512, nulltype } value; int8_t delta_rx_lev_min_ce1_v1360 = -8;
typedef uint16_t number_type;
std::string to_string() const;
uint16_t to_number() const;
};
typedef enumerated<si_periodicity_r12_opts> si_periodicity_r12_e;
// SystemInformationBlockType1-v1450-IEs ::= SEQUENCE
struct sib_type1_v1450_ies_s {
bool tdd_cfg_v1450_present = false;
bool non_crit_ext_present = false;
tdd_cfg_v1450_s tdd_cfg_v1450;
sib_type1_v1530_ies_s non_crit_ext;
// sequence methods // sequence methods
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -1049,6 +1040,16 @@ struct cell_sel_info_v920_s {
// PLMN-InfoList-r15 ::= SEQUENCE (SIZE (1..6)) OF PLMN-Info-r15 // PLMN-InfoList-r15 ::= SEQUENCE (SIZE (1..6)) OF PLMN-Info-r15
using plmn_info_list_r15_l = dyn_array<plmn_info_r15_s>; using plmn_info_list_r15_l = dyn_array<plmn_info_r15_s>;
// SI-Periodicity-r12 ::= ENUMERATED
struct si_periodicity_r12_opts {
enum options { rf8, rf16, rf32, rf64, rf128, rf256, rf512, nulltype } value;
typedef uint16_t number_type;
std::string to_string() const;
uint16_t to_number() const;
};
typedef enumerated<si_periodicity_r12_opts> si_periodicity_r12_e;
// SIB-MappingInfo ::= SEQUENCE (SIZE (0..31)) OF SIB-Type // SIB-MappingInfo ::= SEQUENCE (SIZE (0..31)) OF SIB-Type
using sib_map_info_l = bounded_array<sib_type_e, 31>; using sib_map_info_l = bounded_array<sib_type_e, 31>;

File diff suppressed because it is too large Load Diff

@ -471,9 +471,6 @@ struct rrc_conn_reest_request_s {
// choice methods // choice methods
crit_exts_c_() = default; crit_exts_c_() = default;
crit_exts_c_(const crit_exts_c_& other);
crit_exts_c_& operator=(const crit_exts_c_& other);
~crit_exts_c_() { destroy_(); }
void set(types::options e = types::nulltype); void set(types::options e = types::nulltype);
types type() const { return type_; } types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -483,24 +480,23 @@ struct rrc_conn_reest_request_s {
rrc_conn_reest_request_r8_ies_s& rrc_conn_reest_request_r8() rrc_conn_reest_request_r8_ies_s& rrc_conn_reest_request_r8()
{ {
assert_choice_type("rrcConnectionReestablishmentRequest-r8", type_.to_string(), "criticalExtensions"); assert_choice_type("rrcConnectionReestablishmentRequest-r8", type_.to_string(), "criticalExtensions");
return c.get<rrc_conn_reest_request_r8_ies_s>(); return c;
} }
const rrc_conn_reest_request_r8_ies_s& rrc_conn_reest_request_r8() const const rrc_conn_reest_request_r8_ies_s& rrc_conn_reest_request_r8() const
{ {
assert_choice_type("rrcConnectionReestablishmentRequest-r8", type_.to_string(), "criticalExtensions"); assert_choice_type("rrcConnectionReestablishmentRequest-r8", type_.to_string(), "criticalExtensions");
return c.get<rrc_conn_reest_request_r8_ies_s>(); return c;
} }
rrc_conn_reest_request_r8_ies_s& set_rrc_conn_reest_request_r8() rrc_conn_reest_request_r8_ies_s& set_rrc_conn_reest_request_r8()
{ {
set(types::rrc_conn_reest_request_r8); set(types::rrc_conn_reest_request_r8);
return c.get<rrc_conn_reest_request_r8_ies_s>(); return c;
} }
void set_crit_exts_future() { set(types::crit_exts_future); }
private: private:
types type_; types type_;
choice_buffer_t<rrc_conn_reest_request_r8_ies_s> c; rrc_conn_reest_request_r8_ies_s c;
void destroy_();
}; };
// member variables // member variables
@ -660,9 +656,6 @@ struct rrc_early_data_request_r15_s {
// choice methods // choice methods
crit_exts_c_() = default; crit_exts_c_() = default;
crit_exts_c_(const crit_exts_c_& other);
crit_exts_c_& operator=(const crit_exts_c_& other);
~crit_exts_c_() { destroy_(); }
void set(types::options e = types::nulltype); void set(types::options e = types::nulltype);
types type() const { return type_; } types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -672,24 +665,23 @@ struct rrc_early_data_request_r15_s {
rrc_early_data_request_r15_ies_s& rrc_early_data_request_r15() rrc_early_data_request_r15_ies_s& rrc_early_data_request_r15()
{ {
assert_choice_type("rrcEarlyDataRequest-r15", type_.to_string(), "criticalExtensions"); assert_choice_type("rrcEarlyDataRequest-r15", type_.to_string(), "criticalExtensions");
return c.get<rrc_early_data_request_r15_ies_s>(); return c;
} }
const rrc_early_data_request_r15_ies_s& rrc_early_data_request_r15() const const rrc_early_data_request_r15_ies_s& rrc_early_data_request_r15() const
{ {
assert_choice_type("rrcEarlyDataRequest-r15", type_.to_string(), "criticalExtensions"); assert_choice_type("rrcEarlyDataRequest-r15", type_.to_string(), "criticalExtensions");
return c.get<rrc_early_data_request_r15_ies_s>(); return c;
} }
rrc_early_data_request_r15_ies_s& set_rrc_early_data_request_r15() rrc_early_data_request_r15_ies_s& set_rrc_early_data_request_r15()
{ {
set(types::rrc_early_data_request_r15); set(types::rrc_early_data_request_r15);
return c.get<rrc_early_data_request_r15_ies_s>(); return c;
} }
void set_crit_exts_future() { set(types::crit_exts_future); }
private: private:
types type_; types type_;
choice_buffer_t<rrc_early_data_request_r15_ies_s> c; rrc_early_data_request_r15_ies_s c;
void destroy_();
}; };
// member variables // member variables
@ -812,6 +804,9 @@ struct ul_ccch_msg_type_c {
set(types::rrc_early_data_request_r15); set(types::rrc_early_data_request_r15);
return c; return c;
} }
void set_spare3() { set(types::spare3); }
void set_spare2() { set(types::spare2); }
void set_spare1() { set(types::spare1); }
private: private:
types type_; types type_;
@ -828,9 +823,6 @@ struct ul_ccch_msg_type_c {
// choice methods // choice methods
msg_class_ext_future_r13_c_() = default; msg_class_ext_future_r13_c_() = default;
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); void set(types::options e = types::nulltype);
types type() const { return type_; } types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE pack(bit_ref& bref) const;
@ -840,24 +832,23 @@ struct ul_ccch_msg_type_c {
c3_c_& c3() c3_c_& c3()
{ {
assert_choice_type("c3", type_.to_string(), "messageClassExtensionFuture-r13"); assert_choice_type("c3", type_.to_string(), "messageClassExtensionFuture-r13");
return c.get<c3_c_>(); return c;
} }
const c3_c_& c3() const const c3_c_& c3() const
{ {
assert_choice_type("c3", type_.to_string(), "messageClassExtensionFuture-r13"); assert_choice_type("c3", type_.to_string(), "messageClassExtensionFuture-r13");
return c.get<c3_c_>(); return c;
} }
c3_c_& set_c3() c3_c_& set_c3()
{ {
set(types::c3); set(types::c3);
return c.get<c3_c_>(); return c;
} }
void set_msg_class_ext_future_r15() { set(types::msg_class_ext_future_r15); }
private: private:
types type_; types type_;
choice_buffer_t<c3_c_> c; c3_c_ c;
void destroy_();
}; };
struct types_opts { struct types_opts {
enum options { c2, msg_class_ext_future_r13, nulltype } value; enum options { c2, msg_class_ext_future_r13, nulltype } value;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -22,6 +22,9 @@
#ifndef SRSLTE_RRC_NR_UTILS_H #ifndef SRSLTE_RRC_NR_UTILS_H
#define SRSLTE_RRC_NR_UTILS_H #define SRSLTE_RRC_NR_UTILS_H
#include "srslte/interfaces/mac_interface_types.h"
#include "srslte/interfaces/pdcp_interface_types.h"
#include "srslte/interfaces/rlc_interface_types.h"
#include "srslte/interfaces/rrc_interface_types.h" #include "srslte/interfaces/rrc_interface_types.h"
#include "srslte/interfaces/sched_interface.h" #include "srslte/interfaces/sched_interface.h"
@ -33,6 +36,9 @@ namespace rrc_nr {
struct plmn_id_s; struct plmn_id_s;
struct sib1_s; struct sib1_s;
struct rlc_cfg_c;
struct pdcp_cfg_s;
struct lc_ch_cfg_s;
} // namespace rrc_nr } // namespace rrc_nr
} // namespace asn1 } // namespace asn1
@ -45,6 +51,20 @@ namespace srslte {
plmn_id_t make_plmn_id_t(const asn1::rrc_nr::plmn_id_s& asn1_type); plmn_id_t make_plmn_id_t(const asn1::rrc_nr::plmn_id_s& asn1_type);
void to_asn1(asn1::rrc_nr::plmn_id_s* asn1_type, const plmn_id_t& cfg); void to_asn1(asn1::rrc_nr::plmn_id_s* asn1_type, const plmn_id_t& cfg);
/***************************
* MAC Config
**************************/
logical_channel_config_t make_mac_logical_channel_cfg_t(uint8_t lcid, const asn1::rrc_nr::lc_ch_cfg_s& asn1_type);
/***************************
* RLC Config
**************************/
rlc_config_t make_rlc_config_t(const asn1::rrc_nr::rlc_cfg_c& asn1_type);
/***************************
* PDCP Config
**************************/
pdcp_config_t make_drb_pdcp_config_t(const uint8_t bearer_id, bool is_ue, const asn1::rrc_nr::pdcp_cfg_s& pdcp_cfg);
} // namespace srslte } // namespace srslte
namespace srsenb { namespace srsenb {

File diff suppressed because it is too large Load Diff

@ -31,6 +31,7 @@
#include <memory> #include <memory>
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
#include <sys/time.h>
/******************************************************************************* /*******************************************************************************
DEFINES DEFINES
@ -84,8 +85,6 @@
#define pool_allocate_blocking (srslte::allocate_unique_buffer(*pool, true)) #define pool_allocate_blocking (srslte::allocate_unique_buffer(*pool, true))
#endif #endif
#include "srslte/srslte.h"
/******************************************************************************* /*******************************************************************************
TYPEDEFS TYPEDEFS
*******************************************************************************/ *******************************************************************************/

@ -29,6 +29,7 @@
#include "srslte/common/logmap.h" #include "srslte/common/logmap.h"
#include <fstream> #include <fstream>
#include <sstream>
#include <thread> #include <thread>
namespace srslte { namespace srslte {

@ -23,6 +23,7 @@
#define SRSLTE_CONFIG_FILE_H #define SRSLTE_CONFIG_FILE_H
#include "common.h" #include "common.h"
#include "srslte/phy/common/phy_common.h"
#include <fstream> #include <fstream>
#include <pwd.h> #include <pwd.h>
#include <sys/types.h> #include <sys/types.h>

@ -23,6 +23,7 @@
#define SRSLTE_INTERFACES_COMMON_H #define SRSLTE_INTERFACES_COMMON_H
#include "srslte/common/security.h" #include "srslte/common/security.h"
#include "srslte/phy/common/phy_common.h"
#include <string> #include <string>
namespace srslte { namespace srslte {

@ -146,6 +146,7 @@ LIBLTE_ERROR_ENUM liblte_security_generate_k_up(uint8*
uint8* k_up_enc, uint8* k_up_enc,
uint8* k_up_int); uint8* k_up_int);
LIBLTE_ERROR_ENUM liblte_security_generate_sk_gnb(uint8_t* k_enb, uint8_t* sk_gnb, uint16_t scg_counter);
/********************************************************************* /*********************************************************************
Name: liblte_security_128_eia2 Name: liblte_security_128_eia2
@ -336,4 +337,16 @@ liblte_security_milenage_f2345(uint8* k, uint8* op, uint8* rand, uint8* res, uin
// Functions // Functions
LIBLTE_ERROR_ENUM liblte_security_milenage_f5_star(uint8* k, uint8* op, uint8* rand, uint8* ak); LIBLTE_ERROR_ENUM liblte_security_milenage_f5_star(uint8* k, uint8* op, uint8* rand, uint8* ak);
LIBLTE_ERROR_ENUM liblte_security_generate_k_nr_rrc(uint8* k_gnb,
LIBLTE_SECURITY_CIPHERING_ALGORITHM_ID_ENUM enc_alg_id,
LIBLTE_SECURITY_INTEGRITY_ALGORITHM_ID_ENUM int_alg_id,
uint8* k_rrc_enc,
uint8* k_rrc_int);
LIBLTE_ERROR_ENUM liblte_security_generate_k_nr_up(uint8* k_gnb,
LIBLTE_SECURITY_CIPHERING_ALGORITHM_ID_ENUM enc_alg_id,
LIBLTE_SECURITY_INTEGRITY_ALGORITHM_ID_ENUM int_alg_id,
uint8* k_up_enc,
uint8* k_up_int);
#endif // SRSLTE_LIBLTE_SECURITY_H #endif // SRSLTE_LIBLTE_SECURITY_H

@ -22,19 +22,24 @@
#ifndef SRSLTE_MAC_PCAP_H #ifndef SRSLTE_MAC_PCAP_H
#define SRSLTE_MAC_PCAP_H #define SRSLTE_MAC_PCAP_H
#include "srslte/common/block_queue.h"
#include "srslte/common/buffer_pool.h"
#include "srslte/common/common.h"
#include "srslte/common/logmap.h"
#include "srslte/common/pcap.h" #include "srslte/common/pcap.h"
#include "srslte/common/threads.h"
#include <mutex>
#include <stdint.h> #include <stdint.h>
#include <thread>
namespace srslte { namespace srslte {
class mac_pcap : srslte::thread
class mac_pcap
{ {
public: public:
mac_pcap(); mac_pcap();
~mac_pcap(); ~mac_pcap();
void enable(bool en); void enable(bool en);
void open(const char* filename, uint32_t ue_id = 0); uint32_t open(const char* filename, uint32_t ue_id = 0);
void close(); uint32_t close();
void set_ue_id(uint16_t ue_id); void set_ue_id(uint16_t ue_id);
@ -55,10 +60,12 @@ public:
void write_sl_crnti(uint8_t* pdu, uint32_t pdu_len_bytes, uint16_t rnti, uint32_t reTX, uint32_t tti, uint8_t cc_idx); void write_sl_crnti(uint8_t* pdu, uint32_t pdu_len_bytes, uint16_t rnti, uint32_t reTX, uint32_t tti, uint8_t cc_idx);
private: private:
bool enable_write; srslte::byte_buffer_pool* pool = nullptr;
FILE* pcap_file; srslte::log_ref log;
uint32_t ue_id; bool running = false;
void pack_and_write(uint8_t* pdu, FILE* pcap_file = nullptr;
uint32_t ue_id = 0;
void pack_and_queue(uint8_t* pdu,
uint32_t pdu_len_bytes, uint32_t pdu_len_bytes,
uint32_t reTX, uint32_t reTX,
bool crc_ok, bool crc_ok,
@ -67,6 +74,16 @@ private:
uint16_t crnti_, uint16_t crnti_,
uint8_t direction, uint8_t direction,
uint8_t rnti_type); uint8_t rnti_type);
typedef struct {
MAC_Context_Info_t context;
unique_byte_buffer_t pdu;
} pcap_pdu_t;
block_queue<pcap_pdu_t> queue;
std::mutex mutex;
void write_pdu(pcap_pdu_t& pdu);
void run_thread() final;
}; };
} // namespace srslte } // namespace srslte

@ -29,7 +29,6 @@
#define SRSLTE_METRICS_HUB_H #define SRSLTE_METRICS_HUB_H
#include "srslte/common/threads.h" #include "srslte/common/threads.h"
#include "srslte/srslte.h"
#include <chrono> #include <chrono>
#include <mutex> #include <mutex>
#include <thread> #include <thread>

@ -26,10 +26,14 @@
#include "srslte/common/logmap.h" #include "srslte/common/logmap.h"
#include "srslte/common/threads.h" #include "srslte/common/threads.h"
#include <arpa/inet.h>
#include <functional> #include <functional>
#include <map> #include <map>
#include <mutex> #include <mutex>
#include <netinet/in.h>
#include <netinet/sctp.h> #include <netinet/sctp.h>
#include <netinet/tcp.h>
#include <netinet/udp.h>
#include <queue> #include <queue>
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/types.h> #include <sys/types.h>

@ -69,6 +69,10 @@ struct k_enb_context_t {
uint32_t ncc; uint32_t ncc;
}; };
struct k_gnb_context_t {
as_key_t sk_gnb;
};
struct as_security_config_t { struct as_security_config_t {
as_key_t k_rrc_int; as_key_t k_rrc_int;
as_key_t k_rrc_enc; as_key_t k_rrc_enc;
@ -113,6 +117,20 @@ uint8_t security_generate_k_up(uint8_t* k_enb,
uint8_t* k_up_enc, uint8_t* k_up_enc,
uint8_t* k_up_int); uint8_t* k_up_int);
uint8_t security_generate_k_nr_rrc(uint8_t* k_gnb,
CIPHERING_ALGORITHM_ID_ENUM enc_alg_id,
INTEGRITY_ALGORITHM_ID_ENUM int_alg_id,
uint8_t* k_rrc_enc,
uint8_t* k_rrc_int);
uint8_t security_generate_k_nr_up(uint8_t* k_gnb,
CIPHERING_ALGORITHM_ID_ENUM enc_alg_id,
INTEGRITY_ALGORITHM_ID_ENUM int_alg_id,
uint8_t* k_up_enc,
uint8_t* k_up_int);
uint8_t security_generate_sk_gnb(uint8_t* k_enb, uint8_t* sk_gnb, uint16_t scg_count);
/****************************************************************************** /******************************************************************************
* Integrity Protection * Integrity Protection
*****************************************************************************/ *****************************************************************************/

@ -29,7 +29,7 @@
#ifndef SRSLTE_TIMEOUT_H #ifndef SRSLTE_TIMEOUT_H
#define SRSLTE_TIMEOUT_H #define SRSLTE_TIMEOUT_H
#include "srslte/srslte.h" #include "srslte/phy/utils/debug.h"
#include <pthread.h> #include <pthread.h>
#include <stdint.h> #include <stdint.h>
#include <sys/time.h> #include <sys/time.h>

@ -29,6 +29,7 @@
#ifndef SRSLTE_TIMERS_H #ifndef SRSLTE_TIMERS_H
#define SRSLTE_TIMERS_H #define SRSLTE_TIMERS_H
#include "srslte/phy/utils/debug.h"
#include <algorithm> #include <algorithm>
#include <functional> #include <functional>
#include <limits> #include <limits>
@ -39,8 +40,6 @@
#include <time.h> #include <time.h>
#include <vector> #include <vector>
#include "srslte/srslte.h"
namespace srslte { namespace srslte {
class timer_callback class timer_callback

@ -132,6 +132,8 @@ public:
*/ */
virtual int cqi_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t cqi_value) = 0; virtual int cqi_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t cqi_value) = 0;
typedef enum { PUSCH = 0, PUCCH, SRS } ul_channel_t;
/** /**
* PHY callback for giving MAC the SNR in dB of an UL transmission for a given RNTI at a given carrier * PHY callback for giving MAC the SNR in dB of an UL transmission for a given RNTI at a given carrier
* *
@ -139,9 +141,10 @@ public:
* @param rnti The UE identifier in the eNb * @param rnti The UE identifier in the eNb
* @param cc_idx The eNb Cell/Carrier where the UL transmission was received * @param cc_idx The eNb Cell/Carrier where the UL transmission was received
* @param snr_db The actual SNR of the received signal * @param snr_db The actual SNR of the received signal
* @param ch Indicates uplink channel (PUSCH, PUCCH or SRS)
* @return SRSLTE_SUCCESS if no error occurs, SRSLTE_ERROR* if an error occurs * @return SRSLTE_SUCCESS if no error occurs, SRSLTE_ERROR* if an error occurs
*/ */
virtual int snr_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, float snr_db) = 0; virtual int snr_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, float snr_db, ul_channel_t ch) = 0;
/** /**
* PHY callback for giving MAC the Time Aligment information in microseconds of a given RNTI during a TTI processing * PHY callback for giving MAC the Time Aligment information in microseconds of a given RNTI during a TTI processing
@ -186,12 +189,12 @@ public:
* *
* @param tti the given TTI * @param tti the given TTI
* @param rnti the UE identifier in the eNb * @param rnti the UE identifier in the eNb
* @param pdu_ptr pointer to the uplink buffer * @param enb_cc_idx the eNb Cell/Carrier identifier
* @param nof_bytes the number of grants carrierd by the PUSCH message * @param nof_bytes the number of grants carrierd by the PUSCH message
* @param crc_res the CRC check, set to true if the message was decoded succesfully * @param crc_res the CRC check, set to true if the message was decoded succesfully
* @return SRSLTE_SUCCESS if no error occurs, SRSLTE_ERROR* if an error occurs * @return SRSLTE_SUCCESS if no error occurs, SRSLTE_ERROR* if an error occurs
*/ */
virtual int push_pdu(uint32_t tti_rx, uint16_t rnti, const uint8_t* pdu_ptr, uint32_t nof_bytes, bool crc_res) = 0; virtual int push_pdu(uint32_t tti_rx, uint16_t rnti, uint32_t enb_cc_idx, uint32_t nof_bytes, bool crc_res) = 0;
virtual int get_dl_sched(uint32_t tti, dl_sched_list_t& dl_sched_res) = 0; virtual int get_dl_sched(uint32_t tti, dl_sched_list_t& dl_sched_res) = 0;
virtual int get_mch_sched(uint32_t tti, bool is_mcch, dl_sched_list_t& dl_sched_res) = 0; virtual int get_mch_sched(uint32_t tti, bool is_mcch, dl_sched_list_t& dl_sched_res) = 0;
@ -409,7 +412,7 @@ class rrc_interface_mac
{ {
public: public:
/* Radio Link failure */ /* Radio Link failure */
virtual void add_user(uint16_t rnti, const sched_interface::ue_cfg_t& init_ue_cfg) = 0; virtual int add_user(uint16_t rnti, const sched_interface::ue_cfg_t& init_ue_cfg) = 0;
virtual void upd_user(uint16_t new_rnti, uint16_t old_rnti) = 0; virtual void upd_user(uint16_t new_rnti, uint16_t old_rnti) = 0;
virtual void set_activity_user(uint16_t rnti) = 0; virtual void set_activity_user(uint16_t rnti) = 0;
virtual bool is_paging_opportunity(uint32_t tti, uint32_t* payload_len) = 0; virtual bool is_paging_opportunity(uint32_t tti, uint32_t* payload_len) = 0;

@ -22,6 +22,8 @@
#ifndef SRSLTE_GNB_INTERFACES_H #ifndef SRSLTE_GNB_INTERFACES_H
#define SRSLTE_GNB_INTERFACES_H #define SRSLTE_GNB_INTERFACES_H
#include "srslte/srslte.h"
#include "srslte/common/interfaces_common.h" #include "srslte/common/interfaces_common.h"
#include "srslte/common/security.h" #include "srslte/common/security.h"
#include "srslte/interfaces/pdcp_interface_types.h" #include "srslte/interfaces/pdcp_interface_types.h"
@ -219,7 +221,35 @@ public:
virtual void process_pdus() = 0; virtual void process_pdus() = 0;
}; };
class stack_interface_phy_nr : public srslte::stack_interface_phy_nr class mac_interface_phy_nr
{
public:
const static int MAX_GRANTS = 64;
/**
* DL grant structure per UE
*/
struct dl_sched_grant_t {
srslte_dci_dl_nr_t dci = {};
uint8_t* data[SRSLTE_MAX_TB] = {};
srslte_softbuffer_tx_t* softbuffer_tx[SRSLTE_MAX_TB] = {};
};
/**
* DL Scheduling result per cell/carrier
*/
typedef struct {
dl_sched_grant_t pdsch[MAX_GRANTS]; //< DL Grants
uint32_t nof_grants; //< Number of DL grants
} dl_sched_t;
/**
* List of DL scheduling results, one entry per cell/carrier
*/
typedef std::vector<dl_sched_t> dl_sched_list_t;
};
class stack_interface_phy_nr : public mac_interface_phy_nr, public srslte::stack_interface_phy_nr
{ {
public: public:
struct rx_data_ind_t { struct rx_data_ind_t {
@ -232,9 +262,6 @@ public:
virtual int rx_data_indication(rx_data_ind_t& grant) = 0; virtual int rx_data_indication(rx_data_ind_t& grant) = 0;
}; };
class mac_interface_phy_nr
{};
} // namespace srsenb } // namespace srsenb
#endif // SRSLTE_GNB_INTERFACES_H #endif // SRSLTE_GNB_INTERFACES_H

@ -29,6 +29,23 @@ namespace srslte {
/*************************** /***************************
* MAC Config * MAC Config
**************************/ **************************/
/* Logical Channel Multiplexing and Prioritization + Msg3 Buffer */
class logical_channel_config_t
{
public:
uint8_t lcid;
uint8_t lcg;
int32_t Bj;
int32_t PBR; // in kByte/s, -1 sets to infinity
uint32_t bucket_size;
uint32_t BSD;
uint32_t priority;
int sched_len; // scheduled upper layer payload for this LCID
int buffer_len; // outstanding bytes for this LCID
};
struct bsr_cfg_t { struct bsr_cfg_t {
int periodic_timer; int periodic_timer;
int retx_timer; int retx_timer;

@ -28,6 +28,7 @@
#define SRSLTE_PDCP_INTERFACE_TYPES_H #define SRSLTE_PDCP_INTERFACE_TYPES_H
#include "srslte/common/security.h" #include "srslte/common/security.h"
#include <math.h>
#include <stdint.h> #include <stdint.h>
namespace srslte { namespace srslte {
@ -128,7 +129,7 @@ public:
t_reordering(t_reordering_), t_reordering(t_reordering_),
discard_timer(discard_timer_) discard_timer(discard_timer_)
{ {
hdr_len_bytes = ceil((float)sn_len / 8); hdr_len_bytes = ceilf((float)sn_len / 8);
} }
uint8_t bearer_id = 1; uint8_t bearer_id = 1;

@ -225,7 +225,7 @@ public:
} else if (sn_size == 12) { } else if (sn_size == 12) {
cnfg.um_nr.sn_field_length = rlc_um_nr_sn_size_t::size12bits; cnfg.um_nr.sn_field_length = rlc_um_nr_sn_size_t::size12bits;
cnfg.um_nr.UM_Window_Size = 2048; cnfg.um_nr.UM_Window_Size = 2048;
cnfg.um_nr.mod = 64; cnfg.um_nr.mod = 4096;
} else { } else {
return {}; return {};
} }

@ -40,7 +40,7 @@ public:
const static int MAX_SIB_PAYLOAD_LEN = 2048; const static int MAX_SIB_PAYLOAD_LEN = 2048;
const static int MAX_SIBS = 16; const static int MAX_SIBS = 16;
const static int MAX_LC = 6; const static int MAX_LC = 11;
const static int MAX_LC_GROUP = 4; const static int MAX_LC_GROUP = 4;
const static int MAX_DATA_LIST = 32; const static int MAX_DATA_LIST = 32;
const static int MAX_RAR_LIST = 8; const static int MAX_RAR_LIST = 8;
@ -55,6 +55,7 @@ public:
struct sched_args_t { struct sched_args_t {
std::string sched_policy = "time_pf"; std::string sched_policy = "time_pf";
std::string sched_policy_args = "2";
int pdsch_mcs = -1; int pdsch_mcs = -1;
int pdsch_max_mcs = 28; int pdsch_max_mcs = 28;
int pusch_mcs = -1; int pusch_mcs = -1;

@ -35,6 +35,7 @@
#include "pdcp_interface_types.h" #include "pdcp_interface_types.h"
#include "rlc_interface_types.h" #include "rlc_interface_types.h"
#include "rrc_interface_types.h" #include "rrc_interface_types.h"
#include "srslte/asn1/asn1_utils.h"
#include "srslte/asn1/liblte_mme.h" #include "srslte/asn1/liblte_mme.h"
#include "srslte/common/common.h" #include "srslte/common/common.h"
#include "srslte/common/interfaces_common.h" #include "srslte/common/interfaces_common.h"
@ -160,10 +161,11 @@ typedef struct {
} phy_meas_nr_t; } phy_meas_nr_t;
// RRC interface for RRC NR // RRC interface for RRC NR
class rrc_interface_rrc_nr class rrc_eutra_interface_rrc_nr
{ {
public: public:
virtual void new_cell_meas_nr(const std::vector<phy_meas_nr_t>& meas) = 0; virtual void new_cell_meas_nr(const std::vector<phy_meas_nr_t>& meas) = 0;
virtual void nr_rrc_con_reconfig_complete(bool status) = 0;
}; };
// RRC interface for PHY // RRC interface for PHY
@ -210,6 +212,7 @@ public:
virtual void paging_completed(bool outcome) = 0; virtual void paging_completed(bool outcome) = 0;
virtual std::string get_rb_name(uint32_t lcid) = 0; virtual std::string get_rb_name(uint32_t lcid) = 0;
virtual uint32_t get_lcid_for_eps_bearer(const uint32_t& eps_bearer_id) = 0; virtual uint32_t get_lcid_for_eps_bearer(const uint32_t& eps_bearer_id) = 0;
virtual bool has_nr_dc() = 0;
}; };
// RRC interface for PDCP // RRC interface for PDCP
@ -268,6 +271,30 @@ public:
virtual void enable_encryption(uint32_t lcid, virtual void enable_encryption(uint32_t lcid,
srslte::srslte_direction_t direction = srslte::srslte_direction_t::DIRECTION_TXRX) = 0; srslte::srslte_direction_t direction = srslte::srslte_direction_t::DIRECTION_TXRX) = 0;
}; };
// RRC NR interface for RRC (LTE)
class rrc_nr_interface_rrc
{
public:
virtual void get_eutra_nr_capabilities(srslte::byte_buffer_t* eutra_nr_caps) = 0;
virtual void get_nr_capabilities(srslte::byte_buffer_t* nr_cap) = 0;
virtual void phy_set_cells_to_meas(uint32_t carrier_freq_r15) = 0;
virtual void phy_meas_stop() = 0;
virtual bool rrc_reconfiguration(bool endc_release_and_add_r15,
bool nr_secondary_cell_group_cfg_r15_present,
asn1::dyn_octstring nr_secondary_cell_group_cfg_r15,
bool sk_counter_r15_present,
uint32_t sk_counter_r15,
bool nr_radio_bearer_cfg1_r15_present,
asn1::dyn_octstring nr_radio_bearer_cfg1_r15) = 0;
virtual bool is_config_pending() = 0;
};
class usim_interface_rrc_nr
{
public:
virtual void generate_nr_context(uint16_t sk_counter, srslte::as_security_config_t* sec_cfg) = 0;
virtual void update_nr_context(srslte::as_security_config_t* sec_cfg) = 0;
};
// PDCP interface for RLC // PDCP interface for RLC
class pdcp_interface_rlc class pdcp_interface_rlc

@ -23,6 +23,7 @@
#define SRSLTE_UE_NR_INTERFACES_H #define SRSLTE_UE_NR_INTERFACES_H
#include "srslte/common/interfaces_common.h" #include "srslte/common/interfaces_common.h"
#include "srslte/interfaces/mac_interface_types.h"
#include <string> #include <string>
namespace srsue { namespace srsue {
@ -63,7 +64,12 @@ public:
}; };
class mac_interface_rrc_nr class mac_interface_rrc_nr
{}; {
public:
virtual void setup_lcid(const srslte::logical_channel_config_t& config) = 0;
virtual void set_config(const srslte::bsr_cfg_t& bsr_cfg) = 0;
virtual void set_config(const srslte::sr_cfg_t& sr_cfg) = 0;
};
class phy_interface_mac_nr class phy_interface_mac_nr
{ {

@ -24,6 +24,7 @@
#include "srslte/common/common.h" #include "srslte/common/common.h"
#include "srslte/common/logmap.h" #include "srslte/common/logmap.h"
#include "srslte/config.h"
#include <memory> #include <memory>
#include <stdint.h> #include <stdint.h>
#include <vector> #include <vector>

@ -24,6 +24,7 @@
#include "srslte/common/interfaces_common.h" #include "srslte/common/interfaces_common.h"
#include "srslte/common/logmap.h" #include "srslte/common/logmap.h"
#include <sstream>
#include <stdint.h> #include <stdint.h>
#include <stdio.h> #include <stdio.h>
#include <vector> #include <vector>
@ -227,7 +228,7 @@ public:
void add_sdu(uint32_t sdu_sz) { buffer_tx->N_bytes += sdu_sz; } void add_sdu(uint32_t sdu_sz) { buffer_tx->N_bytes += sdu_sz; }
// Section 6.1.2 // Section 6.1.2
void parse_packet(uint8_t* ptr) uint32_t parse_packet(uint8_t* ptr)
{ {
uint8_t* init_ptr = ptr; uint8_t* init_ptr = ptr;
nof_subheaders = 0; nof_subheaders = 0;
@ -239,19 +240,35 @@ public:
} }
if (ret && ((ptr - init_ptr) >= (int32_t)pdu_len)) { if (ret && ((ptr - init_ptr) >= (int32_t)pdu_len)) {
// stop processing last subheader indicates another one but all bytes are consume // stop processing last subheader indicates another one but all bytes are consumed
nof_subheaders = 0; nof_subheaders = 0;
INFO("Corrupted MAC PDU - all bytes have been consumed (pdu_len=%d)\n", pdu_len);
if (log_h) { if (log_h) {
log_h->info_hex( log_h->warning_hex(
init_ptr, pdu_len, "Corrupted MAC PDU - all bytes have been consumed (pdu_len=%d)\n", pdu_len); init_ptr, pdu_len, "Corrupted MAC PDU - all bytes have been consumed (pdu_len=%d)\n", pdu_len);
} else {
srslte::console("Corrupted MAC PDU - all bytes have been consumed (pdu_len=%d)\n", pdu_len);
} }
return SRSLTE_ERROR;
} }
} while (ret && (nof_subheaders + 1) < (int)max_subheaders && ((int32_t)pdu_len > (ptr - init_ptr))); } while (ret && (nof_subheaders + 1) < (int)max_subheaders && ((int32_t)pdu_len > (ptr - init_ptr)));
for (int i = 0; i < nof_subheaders; i++) { for (int i = 0; i < nof_subheaders; i++) {
subheaders[i].read_payload(&ptr); subheaders[i].read_payload(&ptr);
// stop processing if we read payload beyond the PDU length
if ((ptr - init_ptr) > (int32_t)pdu_len) {
nof_subheaders = 0;
if (log_h) {
log_h->warning_hex(
init_ptr, pdu_len, "Corrupted MAC PDU - all bytes have been consumed (pdu_len=%d)\n", pdu_len);
} else {
srslte::console("Corrupted MAC PDU - all bytes have been consumed (pdu_len=%d)\n", pdu_len);
}
return SRSLTE_ERROR;
}
} }
return SRSLTE_SUCCESS;
} }
protected: protected:
@ -449,7 +466,7 @@ private:
class rar_pdu : public pdu<rar_subh> class rar_pdu : public pdu<rar_subh>
{ {
public: public:
rar_pdu(uint32_t max_rars = 16, srslte::log_ref log_ = {}); rar_pdu(uint32_t max_rars = 16, srslte::log_ref log_ = srslte::logmap::get("MAC"));
void set_backoff(uint8_t bi); void set_backoff(uint8_t bi);
bool has_backoff(); bool has_backoff();

@ -68,12 +68,6 @@ typedef struct SRSLTE_API {
// Group Hopping Flag // Group Hopping Flag
uint32_t* f_gh_pattern; uint32_t* f_gh_pattern;
int32_t q[SRSLTE_SL_MAX_DMRS_SYMB];
float* r[SRSLTE_SL_MAX_DMRS_SYMB];
cf_t* r_uv[SRSLTE_SL_MAX_DMRS_SYMB];
cf_t* r_sequence[SRSLTE_SL_MAX_DMRS_SYMB][SRSLTE_SL_MAX_PSCCH_NOF_DMRS_CYCLIC_SHIFTS]; cf_t* r_sequence[SRSLTE_SL_MAX_DMRS_SYMB][SRSLTE_SL_MAX_PSCCH_NOF_DMRS_CYCLIC_SHIFTS];
cf_t* r_sequence_rx[SRSLTE_SL_MAX_DMRS_SYMB]; cf_t* r_sequence_rx[SRSLTE_SL_MAX_DMRS_SYMB];

@ -50,6 +50,10 @@ typedef struct SRSLTE_API {
uint32_t nof_re; uint32_t nof_re;
float noise_estimate; float noise_estimate;
float noise_estimate_dbm; float noise_estimate_dbm;
float rsrp;
float rsrp_dBfs;
float epre;
float epre_dBfs;
float snr; float snr;
float snr_db; float snr_db;
float cfo; float cfo;

@ -23,12 +23,9 @@
#define SRSLTE_DMRS_PDCCH_H #define SRSLTE_DMRS_PDCCH_H
#include "srslte/phy/common/phy_common_nr.h" #include "srslte/phy/common/phy_common_nr.h"
#include "srslte/phy/phch/dci_nr.h"
#include "srslte/phy/resampling/interp.h"
#include "srslte/phy/resampling/resampler.h" #include "srslte/phy/resampling/resampler.h"
#include "srslte/srslte.h"
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* @brief Puts in the resource grid the DeModulation Reference Signals for decoding PDCCH. * @brief Puts in the resource grid the DeModulation Reference Signals for decoding PDCCH.
@ -191,8 +188,4 @@ SRSLTE_API int srslte_dmrs_pdcch_get_ce(const srslte_dmrs_pdcch_estimator_t* q,
const srslte_dci_location_t* location, const srslte_dci_location_t* location,
srslte_dmrs_pdcch_ce_t* ce); srslte_dmrs_pdcch_ce_t* ce);
#ifdef __cplusplus
}
#endif
#endif // SRSLTE_DMRS_PDCCH_H #endif // SRSLTE_DMRS_PDCCH_H

@ -0,0 +1,104 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#ifndef SRSLTE_DMRS_PUCCH_H
#define SRSLTE_DMRS_PUCCH_H
#include "srslte/config.h"
#include "srslte/phy/ch_estimation/chest_ul.h"
#include "srslte/phy/phch/pucch_nr.h"
#define SRSLTE_DMRS_PUCCH_FORMAT_3_4_MAX_NSYMB 4
/**
* @brief Computes the symbol indexes carrying DMRS for NR-PUCCH formats 3 and 4
* @remark Implements TS 38.211 Table 6.4.1.3.3.2-1: DM-RS positions for PUCCH format 3 and 4.
* @param[in] resource Provides the format 3 or 4 resource
* @param[out] idx Destination data for storing the symbol indexes
* @return The number of DMRS symbols if the resource is valid, SRSLTE_ERROR code otherwise
*/
SRSLTE_API int srslte_dmrs_pucch_format_3_4_get_symbol_idx(const srslte_pucch_nr_resource_t* resource,
uint32_t idx[SRSLTE_DMRS_PUCCH_FORMAT_3_4_MAX_NSYMB]);
/**
* @brief Puts NR-PUCCH format 1 DMRS in the provided resource grid
* @param[in] q NR-PUCCH encoder/decoder object
* @param[in] carrier Carrier configuration
* @param[in] cfg PUCCH common configuration
* @param[in] slot slot configuration
* @param[in] resource PUCCH format 1 resource
* @param[out] slot_symbols Resource grid of the given slot
* @return SRSLTE_SUCCESS if successful, SRSLTE_ERROR code otherwise
*/
SRSLTE_API int srslte_dmrs_pucch_format1_put(const srslte_pucch_nr_t* q,
const srslte_carrier_nr_t* carrier,
const srslte_pucch_nr_common_cfg_t* cfg,
const srslte_dl_slot_cfg_t* slot,
const srslte_pucch_nr_resource_t* resource,
cf_t* slot_symbols);
/**
* @brief Estimates NR-PUCCH format 1 resource elements from their DMRS in the provided resource grid
* @param[in] q NR-PUCCH encoder/decoder object
* @param[in] carrier Carrier configuration
* @param[in] cfg PUCCH common configuration
* @param[in] slot slot configuration
* @param[in] resource PUCCH format 1 resource
* @param[in] slot_symbols Resource grid of the given slot
* @param[out] res UL Channel estimator result
* @return SRSLTE_SUCCESS if successful, SRSLTE_ERROR code otherwise
*/
SRSLTE_API int srslte_dmrs_pucch_format1_estimate(const srslte_pucch_nr_t* q,
const srslte_carrier_nr_t* carrier,
const srslte_pucch_nr_common_cfg_t* cfg,
const srslte_dl_slot_cfg_t* slot,
const srslte_pucch_nr_resource_t* resource,
const cf_t* slot_symbols,
srslte_chest_ul_res_t* res);
/**
* @brief Puts NR-PUCCH format 2 DMRS in the provided resource grid
* @param[in] q NR-PUCCH encoder/decoder object
* @param[in] carrier Carrier configuration
* @param[in] cfg PUCCH common configuration
* @param[in] slot slot configuration
* @param[in] resource PUCCH format 2 resource
* @param[out] slot_symbols Resource grid of the given slot
* @return SRSLTE_SUCCESS if successful, SRSLTE_ERROR code otherwise
*/
int srslte_dmrs_pucch_format2_put(const srslte_pucch_nr_t* q,
const srslte_carrier_nr_t* carrier,
const srslte_pucch_nr_common_cfg_t* cfg,
const srslte_dl_slot_cfg_t* slot,
const srslte_pucch_nr_resource_t* resource,
cf_t* slot_symbols);
/**
* @brief Estimates NR-PUCCH format 2 resource elements from their DMRS in the provided resource grid
* @param[in] q NR-PUCCH encoder/decoder object
* @param[in] carrier Carrier configuration
* @param[in] cfg PUCCH common configuration
* @param[in] slot slot configuration
* @param[in] resource PUCCH format 2 resource
* @param[in] slot_symbols Resource grid of the given slot
* @param[out] res UL Channel estimator result
* @return SRSLTE_SUCCESS if successful, SRSLTE_ERROR code otherwise
*/
int srslte_dmrs_pucch_format2_estimate(const srslte_pucch_nr_t* q,
const srslte_carrier_nr_t* carrier,
const srslte_pucch_nr_common_cfg_t* cfg,
const srslte_dl_slot_cfg_t* slot,
const srslte_pucch_nr_resource_t* resource,
const cf_t* slot_symbols,
srslte_chest_ul_res_t* res);
#endif // SRSLTE_DMRS_PUCCH_H

@ -19,30 +19,26 @@
* *
*/ */
#ifndef SRSLTE_DMRS_PDSCH_H #ifndef SRSLTE_DMRS_SCH_H
#define SRSLTE_DMRS_PDSCH_H #define SRSLTE_DMRS_SCH_H
#include "srslte/phy/ch_estimation/chest_dl.h"
#include "srslte/phy/common/phy_common_nr.h" #include "srslte/phy/common/phy_common_nr.h"
#include "srslte/phy/phch/pdsch_cfg_nr.h" #include "srslte/phy/phch/phch_cfg_nr.h"
#include "srslte/srslte.h"
#include <stdint.h> #include <stdint.h>
#ifdef __cplusplus #define SRSLTE_DMRS_SCH_MAX_SYMBOLS 4
extern "C" {
#endif
#define SRSLTE_DMRS_PDSCH_MAX_SYMBOLS 4
/** /**
* @brief PDSCH DMRS estimator object * @brief PDSCH DMRS estimator object
* *
* @note The DMRS PDSCH object has to be initialised and the carrier parameters needs to be set. * @note The DMRS PDSCH object has to be initialised and the carrier parameters needs to be set.
* *
* @see srslte_dmrs_pdsch_init * @see srslte_dmrs_sch_init
* @see srslte_dmrs_pdsch_set_carrier * @see srslte_dmrs_sch_set_carrier
* @see srslte_dmrs_pdsch_free * @see srslte_dmrs_sch_free
* @see srslte_dmrs_pdsch_put_sf * @see srslte_dmrs_sch_put_sf
* @see srslte_dmrs_pdsch_estimate * @see srslte_dmrs_sch_estimate
*/ */
typedef struct { typedef struct {
bool is_ue; bool is_ue;
@ -56,7 +52,7 @@ typedef struct {
cf_t* pilot_estimates; /// Pilots least squares estimates cf_t* pilot_estimates; /// Pilots least squares estimates
cf_t* temp; /// Temporal data vector of size SRSLTE_NRE * carrier.nof_prb cf_t* temp; /// Temporal data vector of size SRSLTE_NRE * carrier.nof_prb
} srslte_dmrs_pdsch_t; } srslte_dmrs_sch_t;
/** /**
* @brief Computes the symbol indexes carrying DMRS and stores them in symbols_idx * @brief Computes the symbol indexes carrying DMRS and stores them in symbols_idx
@ -65,9 +61,9 @@ typedef struct {
* @param symbols_idx is the destination pointer where the symbols indexes are stored * @param symbols_idx is the destination pointer where the symbols indexes are stored
* @return It returns the number of symbols if inputs are valid, otherwise, it returns SRSLTE_ERROR code. * @return It returns the number of symbols if inputs are valid, otherwise, it returns SRSLTE_ERROR code.
*/ */
SRSLTE_API int srslte_dmrs_pdsch_get_symbols_idx(const srslte_pdsch_cfg_nr_t* pdsch_cfg, SRSLTE_API int srslte_dmrs_sch_get_symbols_idx(const srslte_sch_cfg_nr_t* pdsch_cfg,
const srslte_pdsch_grant_nr_t* grant, const srslte_sch_grant_nr_t* grant,
uint32_t symbols_idx[SRSLTE_DMRS_PDSCH_MAX_SYMBOLS]); uint32_t symbols_idx[SRSLTE_DMRS_SCH_MAX_SYMBOLS]);
/** /**
* @brief Computes the sub-carrier indexes carrying DMRS * @brief Computes the sub-carrier indexes carrying DMRS
@ -78,7 +74,7 @@ SRSLTE_API int srslte_dmrs_pdsch_get_symbols_idx(const srslte_pdsch_cfg_nr_t*
* *
* @return It returns the number of sub-carriers if inputs are valid, otherwise, it returns SRSLTE_ERROR code. * @return It returns the number of sub-carriers if inputs are valid, otherwise, it returns SRSLTE_ERROR code.
*/ */
SRSLTE_API int srslte_dmrs_pdsch_get_sc_idx(const srslte_pdsch_dmrs_cfg_t* cfg, uint32_t max_count, uint32_t* sc_idx); SRSLTE_API int srslte_dmrs_sch_get_sc_idx(const srslte_dmrs_sch_cfg_t* cfg, uint32_t max_count, uint32_t* sc_idx);
/** /**
* @brief Calculates the number of resource elements taken by a PDSCH-DMRS for a given PDSCH transmission * @brief Calculates the number of resource elements taken by a PDSCH-DMRS for a given PDSCH transmission
@ -86,7 +82,7 @@ SRSLTE_API int srslte_dmrs_pdsch_get_sc_idx(const srslte_pdsch_dmrs_cfg_t* cfg,
* @param grant PDSCH information provided by a DCI * @param grant PDSCH information provided by a DCI
* @return it returns the number of resource elements if the configuration is valid, otherwise it returns SRSLTE_ERROR * @return it returns the number of resource elements if the configuration is valid, otherwise it returns SRSLTE_ERROR
*/ */
SRSLTE_API int srslte_dmrs_pdsch_get_N_prb(const srslte_pdsch_cfg_nr_t* cfg, const srslte_pdsch_grant_nr_t* grant); SRSLTE_API int srslte_dmrs_sch_get_N_prb(const srslte_sch_cfg_nr_t* cfg, const srslte_sch_grant_nr_t* grant);
/** /**
* @brief Stringifies the PDSCH DMRS configuration * @brief Stringifies the PDSCH DMRS configuration
@ -98,7 +94,7 @@ SRSLTE_API int srslte_dmrs_pdsch_get_N_prb(const srslte_pdsch_cfg_nr_t* cfg, con
* @return It returns the number of characters written in the vector if no error occurs, otherwise it returns * @return It returns the number of characters written in the vector if no error occurs, otherwise it returns
* SRSLTE_ERROR code * SRSLTE_ERROR code
*/ */
SRSLTE_API int srslte_dmrs_pdsch_cfg_to_str(const srslte_pdsch_dmrs_cfg_t* cfg, char* msg, uint32_t max_len); SRSLTE_API int srslte_dmrs_sch_cfg_to_str(const srslte_dmrs_sch_cfg_t* cfg, char* msg, uint32_t max_len);
/** /**
* @brief Initialises DMRS PDSCH object * @brief Initialises DMRS PDSCH object
@ -107,14 +103,14 @@ SRSLTE_API int srslte_dmrs_pdsch_cfg_to_str(const srslte_pdsch_dmrs_cfg_t* cfg,
* @param is_ue indicates whethe the object is for a UE (in this case, it shall initialise as an estimator) * @param is_ue indicates whethe the object is for a UE (in this case, it shall initialise as an estimator)
* @return it returns SRSLTE_ERROR code if an error occurs, otherwise it returns SRSLTE_SUCCESS * @return it returns SRSLTE_ERROR code if an error occurs, otherwise it returns SRSLTE_SUCCESS
*/ */
SRSLTE_API int srslte_dmrs_pdsch_init(srslte_dmrs_pdsch_t* q, bool is_ue); SRSLTE_API int srslte_dmrs_sch_init(srslte_dmrs_sch_t* q, bool is_ue);
/** /**
* @brief Frees DMRS PDSCH object * @brief Frees DMRS PDSCH object
* *
* @param q DMRS PDSCH object * @param q DMRS PDSCH object
*/ */
SRSLTE_API void srslte_dmrs_pdsch_free(srslte_dmrs_pdsch_t* q); SRSLTE_API void srslte_dmrs_sch_free(srslte_dmrs_sch_t* q);
/** /**
* @brief Sets the carrier configuration. if the PDSCH DMRS object is configured as UE, it will resize internal buffers * @brief Sets the carrier configuration. if the PDSCH DMRS object is configured as UE, it will resize internal buffers
@ -125,7 +121,7 @@ SRSLTE_API void srslte_dmrs_pdsch_free(srslte_dmrs_pdsch_t* q);
* *
* @return it returns SRSLTE_ERROR code if an error occurs, otherwise it returns SRSLTE_SUCCESS * @return it returns SRSLTE_ERROR code if an error occurs, otherwise it returns SRSLTE_SUCCESS
*/ */
SRSLTE_API int srslte_dmrs_pdsch_set_carrier(srslte_dmrs_pdsch_t* q, const srslte_carrier_nr_t* carrier); SRSLTE_API int srslte_dmrs_sch_set_carrier(srslte_dmrs_sch_t* q, const srslte_carrier_nr_t* carrier);
/** /**
* @brief Puts PDSCH DMRS into a given resource grid * @brief Puts PDSCH DMRS into a given resource grid
@ -138,10 +134,10 @@ SRSLTE_API int srslte_dmrs_pdsch_set_carrier(srslte_dmrs_pdsch_t* q, const srslt
* *
* @return it returns SRSLTE_ERROR code if an error occurs, otherwise it returns SRSLTE_SUCCESS * @return it returns SRSLTE_ERROR code if an error occurs, otherwise it returns SRSLTE_SUCCESS
*/ */
SRSLTE_API int srslte_dmrs_pdsch_put_sf(srslte_dmrs_pdsch_t* q, SRSLTE_API int srslte_dmrs_sch_put_sf(srslte_dmrs_sch_t* q,
const srslte_dl_slot_cfg_t* slot_cfg, const srslte_dl_slot_cfg_t* slot_cfg,
const srslte_pdsch_cfg_nr_t* pdsch_cfg, const srslte_sch_cfg_nr_t* pdsch_cfg,
const srslte_pdsch_grant_nr_t* grant, const srslte_sch_grant_nr_t* grant,
cf_t* sf_symbols); cf_t* sf_symbols);
/** /**
@ -158,15 +154,11 @@ SRSLTE_API int srslte_dmrs_pdsch_put_sf(srslte_dmrs_pdsch_t* q,
* *
* @return it returns SRSLTE_ERROR code if an error occurs, otherwise it returns SRSLTE_SUCCESS * @return it returns SRSLTE_ERROR code if an error occurs, otherwise it returns SRSLTE_SUCCESS
*/ */
SRSLTE_API int srslte_dmrs_pdsch_estimate(srslte_dmrs_pdsch_t* q, SRSLTE_API int srslte_dmrs_sch_estimate(srslte_dmrs_sch_t* q,
const srslte_dl_slot_cfg_t* slot_cfg, const srslte_dl_slot_cfg_t* slot_cfg,
const srslte_pdsch_cfg_nr_t* pdsch_cfg, const srslte_sch_cfg_nr_t* pdsch_cfg,
const srslte_pdsch_grant_nr_t* grant, const srslte_sch_grant_nr_t* grant,
const cf_t* sf_symbols, const cf_t* sf_symbols,
srslte_chest_dl_res_t* chest_res); srslte_chest_dl_res_t* chest_res);
#ifdef __cplusplus #endif // SRSLTE_DMRS_SCH_H
}
#endif
#endif // SRSLTE_DMRS_PDSCH_H

@ -35,8 +35,6 @@
#include "srslte/phy/phch/pucch_cfg.h" #include "srslte/phy/phch/pucch_cfg.h"
#include "srslte/phy/phch/pusch_cfg.h" #include "srslte/phy/phch/pusch_cfg.h"
#include "srslte/phy/ch_estimation/ul_rs_tables.h"
#define SRSLTE_NOF_GROUPS_U 30 #define SRSLTE_NOF_GROUPS_U 30
#define SRSLTE_NOF_SEQUENCES_U 2 #define SRSLTE_NOF_SEQUENCES_U 2
#define SRSLTE_NOF_DELTA_SS 30 #define SRSLTE_NOF_DELTA_SS 30
@ -75,8 +73,6 @@ typedef struct SRSLTE_API {
typedef struct SRSLTE_API { typedef struct SRSLTE_API {
srslte_cell_t cell; srslte_cell_t cell;
float* tmp_arg;
uint32_t n_cs_cell[SRSLTE_NSLOTS_X_FRAME][SRSLTE_CP_NORM_NSYMB]; uint32_t n_cs_cell[SRSLTE_NSLOTS_X_FRAME][SRSLTE_CP_NORM_NSYMB];
uint32_t n_prs_pusch[SRSLTE_NOF_DELTA_SS][SRSLTE_NSLOTS_X_FRAME]; // We precompute n_prs needed for cyclic shift alpha uint32_t n_prs_pusch[SRSLTE_NOF_DELTA_SS][SRSLTE_NSLOTS_X_FRAME]; // We precompute n_prs needed for cyclic shift alpha
// at srslte_refsignal_dl_init() // at srslte_refsignal_dl_init()
@ -94,14 +90,8 @@ typedef struct {
cf_t* r[SRSLTE_NOF_SF_X_FRAME]; cf_t* r[SRSLTE_NOF_SF_X_FRAME];
} srslte_refsignal_srs_pregen_t; } srslte_refsignal_srs_pregen_t;
SRSLTE_API int srslte_refsignal_ul_init(srslte_refsignal_ul_t* q, uint32_t max_prb);
SRSLTE_API int srslte_refsignal_ul_set_cell(srslte_refsignal_ul_t* q, srslte_cell_t cell); SRSLTE_API int srslte_refsignal_ul_set_cell(srslte_refsignal_ul_t* q, srslte_cell_t cell);
SRSLTE_API void srslte_refsignal_ul_free(srslte_refsignal_ul_t* q);
SRSLTE_API void srslte_refsignal_r_uv_arg_1prb(float* arg, uint32_t u);
SRSLTE_API uint32_t srslte_refsignal_dmrs_N_rs(srslte_pucch_format_t format, srslte_cp_t cp); SRSLTE_API uint32_t srslte_refsignal_dmrs_N_rs(srslte_pucch_format_t format, srslte_cp_t cp);
SRSLTE_API uint32_t srslte_refsignal_dmrs_pucch_symbol(uint32_t m, srslte_pucch_format_t format, srslte_cp_t cp); SRSLTE_API uint32_t srslte_refsignal_dmrs_pucch_symbol(uint32_t m, srslte_pucch_format_t format, srslte_cp_t cp);
@ -200,6 +190,4 @@ SRSLTE_API uint32_t srslte_refsignal_srs_rb_L_cs(uint32_t bw_cfg, uint32_t nof_p
SRSLTE_API uint32_t srslte_refsignal_srs_M_sc(srslte_refsignal_ul_t* q, srslte_refsignal_srs_cfg_t* cfg); SRSLTE_API uint32_t srslte_refsignal_srs_M_sc(srslte_refsignal_ul_t* q, srslte_refsignal_srs_cfg_t* cfg);
SRSLTE_API uint32_t srslte_refsignal_get_q(uint32_t u, uint32_t v, uint32_t N_sz);
#endif // SRSLTE_REFSIGNAL_UL_H #endif // SRSLTE_REFSIGNAL_UL_H

@ -1,91 +0,0 @@
/**
* Copyright 2013-2020 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 SRSLTE_UL_RS_TABLES_H
#define SRSLTE_UL_RS_TABLES_H
#include <stdint.h>
// Phi values for M_sc=12 Table 5.5.1.2-1 in 36.211
static const int phi_M_sc_12[30][12] = {{-1, 1, 3, -3, 3, 3, 1, 1, 3, 1, -3, 3}, {1, 1, 3, 3, 3, -1, 1, -3, -3, 1, -3, 3},
{1, 1, -3, -3, -3, -1, -3, -3, 1, -3, 1, -1}, {-1, 1, 1, 1, 1, -1, -3, -3, 1, -3, 3, -1},
{-1, 3, 1, -1, 1, -1, -3, -1, 1, -1, 1, 3}, {1, -3, 3, -1, -1, 1, 1, -1, -1, 3, -3, 1},
{-1, 3, -3, -3, -3, 3, 1, -1, 3, 3, -3, 1}, {-3, -1, -1, -1, 1, -3, 3, -1, 1, -3, 3, 1},
{1, -3, 3, 1, -1, -1, -1, 1, 1, 3, -1, 1}, {1, -3, -1, 3, 3, -1, -3, 1, 1, 1, 1, 1},
{-1, 3, -1, 1, 1, -3, -3, -1, -3, -3, 3, -1}, {3, 1, -1, -1, 3, 3, -3, 1, 3, 1, 3, 3},
{1, -3, 1, 1, -3, 1, 1, 1, -3, -3, -3, 1}, {3, 3, -3, 3, -3, 1, 1, 3, -1, -3, 3, 3},
{-3, 1, -1, -3, -1, 3, 1, 3, 3, 3, -1, 1}, {3, -1, 1, -3, -1, -1, 1, 1, 3, 1, -1, -3},
{1, 3, 1, -1, 1, 3, 3, 3, -1, -1, 3, -1}, {-3, 1, 1, 3, -3, 3, -3, -3, 3, 1, 3, -1},
{-3, 3, 1, 1, -3, 1, -3, -3, -1, -1, 1, -3}, {-1, 3, 1, 3, 1, -1, -1, 3, -3, -1, -3, -1},
{-1, -3, 1, 1, 1, 1, 3, 1, -1, 1, -3, -1}, {-1, 3, -1, 1, -3, -3, -3, -3, -3, 1, -1, -3},
{1, 1, -3, -3, -3, -3, -1, 3, -3, 1, -3, 3}, {1, 1, -1, -3, -1, -3, 1, -1, 1, 3, -1, 1},
{1, 1, 3, 1, 3, 3, -1, 1, -1, -3, -3, 1}, {1, -3, 3, 3, 1, 3, 3, 1, -3, -1, -1, 3},
{1, 3, -3, -3, 3, -3, 1, -1, -1, 3, -1, -3}, {-3, -1, -3, -1, -3, 3, 1, -1, 1, 3, -3, -3},
{-1, 3, -3, 3, -1, 3, 3, -3, 3, 3, -1, -1}, {3, -3, -3, -1, -1, -3, -1, 3, -3, 3, 1, -1}};
// Phi values for M_sc=24 Table 5.5.1.2-2 in 36.211
static const int phi_M_sc_24[30][24] = {{-1, 3, 1, -3, 3, -1, 1, 3, -3, 3, 1, 3, -3, 3, 1, 1, -1, 1, 3, -3, 3, -3, -1, -3},
{-3, 3, -3, -3, -3, 1, -3, -3, 3, -1, 1, 1, 1, 3, 1, -1, 3, -3, -3, 1, 3, 1, 1, -3},
{3, -1, 3, 3, 1, 1, -3, 3, 3, 3, 3, 1, -1, 3, -1, 1, 1, -1, -3, -1, -1, 1, 3, 3},
{-1, -3, 1, 1, 3, -3, 1, 1, -3, -1, -1, 1, 3, 1, 3, 1, -1, 3, 1, 1, -3, -1, -3, -1},
{-1, -1, -1, -3, -3, -1, 1, 1, 3, 3, -1, 3, -1, 1, -1, -3, 1, -1, -3, -3, 1, -3, -1, -1},
{-3, 1, 1, 3, -1, 1, 3, 1, -3, 1, -3, 1, 1, -1, -1, 3, -1, -3, 3, -3, -3, -3, 1, 1},
{1, 1, -1, -1, 3, -3, -3, 3, -3, 1, -1, -1, 1, -1, 1, 1, -1, -3, -1, 1, -1, 3, -1, -3},
{-3, 3, 3, -1, -1, -3, -1, 3, 1, 3, 1, 3, 1, 1, -1, 3, 1, -1, 1, 3, -3, -1, -1, 1},
{-3, 1, 3, -3, 1, -1, -3, 3, -3, 3, -1, -1, -1, -1, 1, -3, -3, -3, 1, -3, -3, -3, 1, -3},
{1, 1, -3, 3, 3, -1, -3, -1, 3, -3, 3, 3, 3, -1, 1, 1, -3, 1, -1, 1, 1, -3, 1, 1},
{-1, 1, -3, -3, 3, -1, 3, -1, -1, -3, -3, -3, -1, -3, -3, 1, -1, 1, 3, 3, -1, 1, -1, 3},
{1, 3, 3, -3, -3, 1, 3, 1, -1, -3, -3, -3, 3, 3, -3, 3, 3, -1, -3, 3, -1, 1, -3, 1},
{1, 3, 3, 1, 1, 1, -1, -1, 1, -3, 3, -1, 1, 1, -3, 3, 3, -1, -3, 3, -3, -1, -3, -1},
{3, -1, -1, -1, -1, -3, -1, 3, 3, 1, -1, 1, 3, 3, 3, -1, 1, 1, -3, 1, 3, -1, -3, 3},
{-3, -3, 3, 1, 3, 1, -3, 3, 1, 3, 1, 1, 3, 3, -1, -1, -3, 1, -3, -1, 3, 1, 1, 3},
{-1, -1, 1, -3, 1, 3, -3, 1, -1, -3, -1, 3, 1, 3, 1, -1, -3, -3, -1, -1, -3, -3, -3, -1},
{-1, -3, 3, -1, -1, -1, -1, 1, 1, -3, 3, 1, 3, 3, 1, -1, 1, -3, 1, -3, 1, 1, -3, -1},
{1, 3, -1, 3, 3, -1, -3, 1, -1, -3, 3, 3, 3, -1, 1, 1, 3, -1, -3, -1, 3, -1, -1, -1},
{1, 1, 1, 1, 1, -1, 3, -1, -3, 1, 1, 3, -3, 1, -3, -1, 1, 1, -3, -3, 3, 1, 1, -3},
{1, 3, 3, 1, -1, -3, 3, -1, 3, 3, 3, -3, 1, -1, 1, -1, -3, -1, 1, 3, -1, 3, -3, -3},
{-1, -3, 3, -3, -3, -3, -1, -1, -3, -1, -3, 3, 1, 3, -3, -1, 3, -1, 1, -1, 3, -3, 1, -1},
{-3, -3, 1, 1, -1, 1, -1, 1, -1, 3, 1, -3, -1, 1, -1, 1, -1, -1, 3, 3, -3, -1, 1, -3},
{-3, -1, -3, 3, 1, -1, -3, -1, -3, -3, 3, -3, 3, -3, -1, 1, 3, 1, -3, 1, 3, 3, -1, -3},
{-1, -1, -1, -1, 3, 3, 3, 1, 3, 3, -3, 1, 3, -1, 3, -1, 3, 3, -3, 3, 1, -1, 3, 3},
{1, -1, 3, 3, -1, -3, 3, -3, -1, -1, 3, -1, 3, -1, -1, 1, 1, 1, 1, -1, -1, -3, -1, 3},
{1, -1, 1, -1, 3, -1, 3, 1, 1, -1, -1, -3, 1, 1, -3, 1, 3, -3, 1, 1, -3, -3, -1, -1},
{-3, -1, 1, 3, 1, 1, -3, -1, -1, -3, 3, -3, 3, 1, -3, 3, -3, 1, -1, 1, -3, 1, 1, 1},
{-1, -3, 3, 3, 1, 1, 3, -1, -3, -1, -1, -1, 3, 1, -3, -3, -1, 3, -3, -1, -3, -1, -3, -1},
{-1, -3, -1, -1, 1, -3, -1, -1, 1, -1, -3, 1, 1, -3, 1, -3, -3, 3, 1, 1, -1, 3, -1, -1},
{1, 1, -1, -1, -3, -1, 3, -1, 3, -1, 1, 3, 1, -1, 3, 1, 3, -3, -3, 1, -1, -1, 1, 3}};
// Prime numbers used for Section 5.5.1.1 of 36.211
#define NOF_PRIME_NUMBERS 196
static const uint32_t prime_numbers[NOF_PRIME_NUMBERS] = {
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61,
67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151,
157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251,
257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359,
367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463,
467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593,
599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701,
709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827,
829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953,
967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069,
1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193};
#endif

@ -22,12 +22,14 @@
#ifndef SRSLTE_CHANNEL_H #ifndef SRSLTE_CHANNEL_H
#define SRSLTE_CHANNEL_H #define SRSLTE_CHANNEL_H
#include "ch_awgn.h"
#include "delay.h" #include "delay.h"
#include "fading.h" #include "fading.h"
#include "hst.h" #include "hst.h"
#include "rlf.h" #include "rlf.h"
#include "srslte/common/log_filter.h"
#include "srslte/phy/common/phy_common.h"
#include <memory> #include <memory>
#include <srslte/common/log_filter.h>
#include <string> #include <string>
namespace srslte { namespace srslte {

@ -22,7 +22,10 @@
#ifndef SRSLTE_DELAY_H #ifndef SRSLTE_DELAY_H
#define SRSLTE_DELAY_H #define SRSLTE_DELAY_H
#include <srslte/srslte.h> #include "srslte/config.h"
#include "srslte/phy/common/timestamp.h"
#include "srslte/phy/utils/ringbuffer.h"
#include <stdint.h>
typedef struct { typedef struct {
float delay_min_us; float delay_min_us;

@ -22,8 +22,11 @@
#ifndef SRSLTE_FADING_H #ifndef SRSLTE_FADING_H
#define SRSLTE_FADING_H #define SRSLTE_FADING_H
#include "srslte/config.h"
#include "srslte/phy/common/timestamp.h"
#include "srslte/phy/dft/dft.h"
#include <inttypes.h> #include <inttypes.h>
#include <srslte/srslte.h> #include <stdint.h>
#define SRSLTE_CHANNEL_FADING_MAXTAPS 9 #define SRSLTE_CHANNEL_FADING_MAXTAPS 9
#define SRSLTE_CHANNEL_FADING_NTERMS 16 #define SRSLTE_CHANNEL_FADING_NTERMS 16

@ -22,7 +22,9 @@
#ifndef SRSLTE_HST_H_ #ifndef SRSLTE_HST_H_
#define SRSLTE_HST_H_ #define SRSLTE_HST_H_
#include <srslte/srslte.h> #include "srslte/config.h"
#include "srslte/phy/common/timestamp.h"
#include <stdint.h>
typedef struct { typedef struct {
// System parameters // System parameters

@ -22,7 +22,9 @@
#ifndef SRSLTE_RLF_H #ifndef SRSLTE_RLF_H
#define SRSLTE_RLF_H #define SRSLTE_RLF_H
#include <srslte/srslte.h> #include "srslte/config.h"
#include "srslte/phy/common/timestamp.h"
#include <stdint.h>
typedef struct { typedef struct {
uint32_t t_on_ms; uint32_t t_on_ms;

@ -73,7 +73,9 @@ extern "C" {
#define SRSLTE_LTE_CRC24B 0X1800063 #define SRSLTE_LTE_CRC24B 0X1800063
#define SRSLTE_LTE_CRC24C 0X1B2B117 #define SRSLTE_LTE_CRC24C 0X1B2B117
#define SRSLTE_LTE_CRC16 0x11021 #define SRSLTE_LTE_CRC16 0x11021
#define SRSLTE_LTE_CRC11 0xE21
#define SRSLTE_LTE_CRC8 0x19B #define SRSLTE_LTE_CRC8 0x19B
#define SRSLTE_LTE_CRC6 0x61
#define SRSLTE_MAX_MBSFN_AREA_IDS 256 #define SRSLTE_MAX_MBSFN_AREA_IDS 256
#define SRSLTE_PMCH_RV 0 #define SRSLTE_PMCH_RV 0
@ -281,7 +283,7 @@ typedef enum SRSLTE_API { SRSLTE_MIMO_DECODER_ZF, SRSLTE_MIMO_DECODER_MMSE } srs
* \brief Types of modulations and associated modulation order. * \brief Types of modulations and associated modulation order.
*/ */
typedef enum SRSLTE_API { typedef enum SRSLTE_API {
SRSLTE_MOD_BPSK = 0, /*!< \brief pi/2-BPSK. */ SRSLTE_MOD_BPSK = 0, /*!< \brief BPSK. */
SRSLTE_MOD_QPSK, /*!< \brief QPSK. */ SRSLTE_MOD_QPSK, /*!< \brief QPSK. */
SRSLTE_MOD_16QAM, /*!< \brief QAM16. */ SRSLTE_MOD_16QAM, /*!< \brief QAM16. */
SRSLTE_MOD_64QAM, /*!< \brief QAM64. */ SRSLTE_MOD_64QAM, /*!< \brief QAM64. */
@ -462,7 +464,7 @@ SRSLTE_API float srslte_coderate(uint32_t tbs, uint32_t nof_re);
SRSLTE_API char* srslte_cp_string(srslte_cp_t cp); SRSLTE_API char* srslte_cp_string(srslte_cp_t cp);
SRSLTE_API srslte_mod_t srslte_str2mod(char* mod_str); SRSLTE_API srslte_mod_t srslte_str2mod(const char* mod_str);
SRSLTE_API char* srslte_mod_string(srslte_mod_t mod); SRSLTE_API char* srslte_mod_string(srslte_mod_t mod);

@ -32,7 +32,7 @@ extern "C" {
/** /**
* @brief Defines the number of symbols per slot. Defined by TS 38.211 v15.8.0 Table 4.3.2-1. * @brief Defines the number of symbols per slot. Defined by TS 38.211 v15.8.0 Table 4.3.2-1.
*/ */
#define SRSLTE_NSYMB_PER_SLOT_NR 14 #define SRSLTE_NSYMB_PER_SLOT_NR 14U
/** /**
* @brief Defines the resource grid size in physical resource elements (frequency and time domain) * @brief Defines the resource grid size in physical resource elements (frequency and time domain)
@ -46,7 +46,7 @@ extern "C" {
/** /**
* @brief Defines the maximum numerology supported. Defined by TS 38.211 v15.8.0 Table 4.3.2-1. * @brief Defines the maximum numerology supported. Defined by TS 38.211 v15.8.0 Table 4.3.2-1.
*/ */
#define SRSLTE_NR_MAX_NUMEROLOGY 4 #define SRSLTE_NR_MAX_NUMEROLOGY 4U
/** /**
* @brief Defines the symbol duration, including cyclic prefix * @brief Defines the symbol duration, including cyclic prefix
@ -137,10 +137,14 @@ typedef enum SRSLTE_API {
* @brief PDSCH mapping type * @brief PDSCH mapping type
* @remark Described in TS 38.331 V15.10.0 Section PDSCH-TimeDomainResourceAllocationList * @remark Described in TS 38.331 V15.10.0 Section PDSCH-TimeDomainResourceAllocationList
*/ */
typedef enum SRSLTE_API { srslte_pdsch_mapping_type_A = 0, srslte_pdsch_mapping_type_B } srslte_pdsch_mapping_type_t; typedef enum SRSLTE_API { srslte_sch_mapping_type_A = 0, srslte_sch_mapping_type_B } srslte_sch_mapping_type_t;
typedef enum SRSLTE_API { typedef enum SRSLTE_API {
srslte_search_space_type_common = 0, srslte_search_space_type_common = 0,
srslte_search_space_type_common_0,
srslte_search_space_type_common_0A,
srslte_search_space_type_common_1,
srslte_search_space_type_common_2,
srslte_search_space_type_ue, srslte_search_space_type_ue,
} srslte_search_space_type_t; } srslte_search_space_type_t;
@ -154,6 +158,20 @@ typedef enum SRSLTE_API {
srslte_mcs_table_N srslte_mcs_table_N
} srslte_mcs_table_t; } srslte_mcs_table_t;
/**
* @brief RNTI types
*/
typedef enum SRSLTE_API {
srslte_rnti_type_c = 0,
srslte_rnti_type_p,
srslte_rnti_type_si,
srslte_rnti_type_ra,
srslte_rnti_type_tc,
srslte_rnti_type_cs,
srslte_rnti_type_sp_csi,
srslte_rnti_type_mcs_crnti,
} srslte_rnti_type_t;
/** /**
* @brief DCI formats * @brief DCI formats
* @remark Described in TS 38.212 V15.9.0 Section 7.3.1 DCI formats * @remark Described in TS 38.212 V15.9.0 Section 7.3.1 DCI formats
@ -167,7 +185,9 @@ typedef enum SRSLTE_API {
srslte_dci_format_nr_2_1, ///< @brief Notifying a group of UEs of the PRB(s) and OFDM symbol(s) where UE may assume no srslte_dci_format_nr_2_1, ///< @brief Notifying a group of UEs of the PRB(s) and OFDM symbol(s) where UE may assume no
///< transmission is intended for the UE ///< transmission is intended for the UE
srslte_dci_format_nr_2_2, ///< @brief Transmission of TPC commands for PUCCH and PUSCH srslte_dci_format_nr_2_2, ///< @brief Transmission of TPC commands for PUCCH and PUSCH
srslte_dci_format_nr_2_3 ///< @brief Transmission of a group of TPC commands for SRS transmissions by one or more UEs srslte_dci_format_nr_2_3, ///< @brief Transmission of a group of TPC commands for SRS transmissions by one or more UEs
srslte_dci_format_nr_rar, ///< @brief Scheduling a transmission of PUSCH from RAR
srslte_dci_format_nr_cg ///< @brief Scheduling of PUSCH using a configured grant
} srslte_dci_format_nr_t; } srslte_dci_format_nr_t;
/** /**
@ -284,7 +304,7 @@ SRSLTE_API uint32_t srslte_coreset_get_sz(const srslte_coreset_t* coreset);
* @param mapping_type Mapping type * @param mapping_type Mapping type
* @return Constant string with PDSCH mapping type * @return Constant string with PDSCH mapping type
*/ */
SRSLTE_API const char* srslte_pdsch_mapping_type_to_str(srslte_pdsch_mapping_type_t mapping_type); SRSLTE_API const char* srslte_sch_mapping_type_to_str(srslte_sch_mapping_type_t mapping_type);
/** /**
* @brief Get the MCS table string * @brief Get the MCS table string

@ -34,6 +34,8 @@
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/common/phy_common.h" #include "srslte/phy/common/phy_common.h"
#define SRSLTE_SEQUENCE_MOD(X) ((X) & (uint32_t)INT32_MAX)
typedef struct SRSLTE_API { typedef struct SRSLTE_API {
uint32_t x1; uint32_t x1;
uint32_t x2; uint32_t x2;
@ -71,6 +73,8 @@ SRSLTE_API void srslte_sequence_apply_c(const int8_t* in, int8_t* out, uint32_t
SRSLTE_API void srslte_sequence_apply_bit(const uint8_t* in, uint8_t* out, uint32_t length, uint32_t seed); SRSLTE_API void srslte_sequence_apply_bit(const uint8_t* in, uint8_t* out, uint32_t length, uint32_t seed);
SRSLTE_API void srslte_sequence_apply_bit_packed(const uint8_t* in, uint8_t* out, uint32_t length, uint32_t seed);
SRSLTE_API int srslte_sequence_pbch(srslte_sequence_t* seq, srslte_cp_t cp, uint32_t cell_id); SRSLTE_API int srslte_sequence_pbch(srslte_sequence_t* seq, srslte_cp_t cp, uint32_t cell_id);
SRSLTE_API int srslte_sequence_pcfich(srslte_sequence_t* seq, uint32_t nslot, uint32_t cell_id); SRSLTE_API int srslte_sequence_pcfich(srslte_sequence_t* seq, uint32_t nslot, uint32_t cell_id);

@ -0,0 +1,102 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#ifndef SRSLTE_ZC_SEQUENCE_H
#define SRSLTE_ZC_SEQUENCE_H
#include "srslte/config.h"
#include <stdbool.h>
#include <stdint.h>
/**
* @brief Defines the maximum number of ZC sequence groups (u)
*/
#define SRSLTE_ZC_SEQUENCE_NOF_GROUPS 30
/**
* @brief Defines the maximum number of base sequences (v)
*/
#define SRSLTE_ZC_SEQUENCE_NOF_BASE 2
/**
* @brief Generates ZC sequences given the required parameters used in the TS 36 series (LTE)
*
* @remark Implemented as defined in TS 36.211 section 5.5.1 Generation of the reference signal sequence
*
* @param[in] u Group number {0,1,...29}
* @param[in] v Base sequence
* @param[in] alpha Phase shift
* @param[in] nof_prb Number of PRB
* @param[out] sequence Output sequence
* @return SRSLTE_SUCCESS if the generation is successful, SRSLTE_ERROR code otherwise
*/
SRSLTE_API int srslte_zc_sequence_generate_lte(uint32_t u, uint32_t v, float alpha, uint32_t nof_prb, cf_t* sequence);
/**
* @brief Generates ZC sequences given the required parameters used in the TS 38 series (NR)
*
* @remark Implemented as defined in TS 38.211 section 5.2.2 Low-PAPR sequence generation
*
* @param u Group number {0,1,...29}
* @param v base sequence
* @param alpha Phase shift
* @param m Number of PRB
* @param delta Delta parameter described in specification
* @param sequence Output sequence
* @return SRSLTE_SUCCESS if the generation is successful, SRSLTE_ERROR code otherwise
*/
SRSLTE_API int
srslte_zc_sequence_generate_nr(uint32_t u, uint32_t v, float alpha, uint32_t m, uint32_t delta, cf_t* sequence);
/**
* @brief Low-PAPR ZC sequence look-up-table
*/
typedef struct SRSLTE_API {
uint32_t M_zc;
uint32_t nof_alphas;
cf_t* sequence[SRSLTE_ZC_SEQUENCE_NOF_GROUPS][SRSLTE_ZC_SEQUENCE_NOF_BASE];
} srslte_zc_sequence_lut_t;
/**
* @brief Initialises a Low-PAPR sequence look-up-table object using NR tables
*
* @param q Object pointer
* @param m Number of PRB
* @param delta Delta parameter described in specification
* @param alphas Vector with the alpha shift parameters
* @param nof_alphas Number alpha shifts to generate
* @return SRSLTE_SUCCESS if the initialization is successful, SRSLTE_ERROR code otherwise
*/
SRSLTE_API int srslte_zc_sequence_lut_init_nr(srslte_zc_sequence_lut_t* q,
uint32_t m,
uint32_t delta,
float* alphas,
uint32_t nof_alphas);
/**
* @brief Deallocates a Low-PAPR sequence look-up-table object
* @param q Object pointer
*/
SRSLTE_API void srslte_zc_sequence_lut_free(srslte_zc_sequence_lut_t* q);
/**
* @brief Get a Low-PAPR sequence from the LUT
* @param q Object pointer
* @param u Group number {0,1,...29}
* @param v base sequence
* @param alpha_idx Phase shift index
* @return SRSLTE_SUCCESS if the generation is successful, SRSLTE_ERROR code otherwise
*/
SRSLTE_API const cf_t*
srslte_zc_sequence_lut_get(const srslte_zc_sequence_lut_t* q, uint32_t u, uint32_t v, uint32_t alpha_idx);
#endif // SRSLTE_ZC_SEQUENCE_H

@ -27,10 +27,6 @@
#include "srslte/phy/phch/pdcch_nr.h" #include "srslte/phy/phch/pdcch_nr.h"
#include "srslte/phy/phch/pdsch_nr.h" #include "srslte/phy/phch/pdsch_nr.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct SRSLTE_API { typedef struct SRSLTE_API {
srslte_pdsch_nr_args_t pdsch; srslte_pdsch_nr_args_t pdsch;
srslte_pdcch_nr_args_t pdcch; srslte_pdcch_nr_args_t pdcch;
@ -48,7 +44,7 @@ typedef struct SRSLTE_API {
cf_t* sf_symbols[SRSLTE_MAX_PORTS]; cf_t* sf_symbols[SRSLTE_MAX_PORTS];
srslte_pdsch_nr_t pdsch; srslte_pdsch_nr_t pdsch;
srslte_dmrs_pdsch_t dmrs; srslte_dmrs_sch_t dmrs;
srslte_pdcch_nr_t pdcch; srslte_pdcch_nr_t pdcch;
} srslte_enb_dl_nr_t; } srslte_enb_dl_nr_t;
@ -68,25 +64,15 @@ SRSLTE_API void srslte_enb_dl_nr_gen_signal(srslte_enb_dl_nr_t* q);
SRSLTE_API int srslte_enb_dl_nr_pdcch_put(srslte_enb_dl_nr_t* q, SRSLTE_API int srslte_enb_dl_nr_pdcch_put(srslte_enb_dl_nr_t* q,
const srslte_dl_slot_cfg_t* slot_cfg, const srslte_dl_slot_cfg_t* slot_cfg,
const srslte_search_space_t* search_space, const srslte_dci_dl_nr_t* dci_dl);
const srslte_dci_dl_nr_t* dci_dl,
const srslte_dci_location_t* dci_location,
uint16_t rnti);
SRSLTE_API int srslte_enb_dl_nr_pdsch_put(srslte_enb_dl_nr_t* q, SRSLTE_API int srslte_enb_dl_nr_pdsch_put(srslte_enb_dl_nr_t* q,
const srslte_dl_slot_cfg_t* slot, const srslte_dl_slot_cfg_t* slot,
const srslte_pdsch_cfg_nr_t* cfg, const srslte_sch_cfg_nr_t* cfg,
const srslte_pdsch_grant_nr_t* grant,
uint8_t* data[SRSLTE_MAX_TB]); uint8_t* data[SRSLTE_MAX_TB]);
SRSLTE_API int srslte_enb_dl_nr_pdsch_info(const srslte_enb_dl_nr_t* q, SRSLTE_API int
const srslte_pdsch_cfg_nr_t* cfg, srslte_enb_dl_nr_pdsch_info(const srslte_enb_dl_nr_t* q, const srslte_sch_cfg_nr_t* cfg, char* str, uint32_t str_len);
const srslte_pdsch_grant_nr_t* grant,
char* str,
uint32_t str_len);
#ifdef __cplusplus
}
#endif
#endif // SRSLTE_ENB_DL_NR_H #endif // SRSLTE_ENB_DL_NR_H

@ -0,0 +1,65 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#ifndef SRSLTE_BLOCK_H
#define SRSLTE_BLOCK_H
#include "srslte/config.h"
#include <stdbool.h>
#include <stdint.h>
/**
* @brief Maximum number of bits that can be encoded
*/
#define SRSLTE_FEC_BLOCK_MAX_NOF_BITS 11U
/**
* @brief Block coding output complete length
*/
#define SRSLTE_FEC_BLOCK_SIZE 32U
/**
* @brief Encodes unpacked data using ReedMuller code block channel coding.
*
* @remark Described by 3GPP 36.212 section 5.2.3.3 for 4G/LTE
* @remark Described by 3GPP 38.212 section 5.3.3.3 for 5G/NR
*
* @param[in] input provides unpacked bits to encode
* @param[in] input_len number of bits to encode, the maximum number of bits is SRSLTE_FEC_BLOCK_MAX_NOF_BITS
* @param[out] output points to the unpacked encoded data
* @param[in] output_len number of bits of encoded bits
*/
SRSLTE_API void srslte_block_encode(const uint8_t* input, uint32_t input_len, uint8_t* output, uint32_t output_len);
/**
* @brief Decodes 16-bit signed data using ReedMuller code block channel coding.
*
* @param[in] llr Provides received LLRs
* @param[in] nof_llr number of available LLRs
* @param[out] data Data destination to store unpacked received bits
* @param[in] data_len number of bits to decode, the maximum number of bits is SRSLTE_FEC_BLOCK_MAX_NOF_BITS
* @return Decoded bits correlation if provided arguments are valid, otherwise SRSLTE_ERROR code
*/
SRSLTE_API int32_t srslte_block_decode_i16(const int16_t* llr, uint32_t nof_llr, uint8_t* data, uint32_t data_len);
/**
* @brief Decodes 8-bit signed data using ReedMuller code block channel coding.
*
* @param[in] llr Provides received LLRs
* @param[in] nof_llr number of available LLRs
* @param[out] data Data destination to store unpacked received bits
* @param[in] data_len number of bits to decode, the maximum number of bits is SRSLTE_FEC_BLOCK_MAX_NOF_BITS
* @return Decoded bits correlation if provided arguments are valid, otherwise SRSLTE_ERROR code
*/
SRSLTE_API int32_t srslte_block_decode_i8(const int8_t* llr, uint32_t nof_llr, uint8_t* data, uint32_t data_len);
#endif // SRSLTE_BLOCK_H

@ -56,11 +56,20 @@ SRSLTE_API uint32_t srslte_crc_attach_byte(srslte_crc_t* h, uint8_t* data, int l
static inline void srslte_crc_checksum_put_byte(srslte_crc_t* h, uint8_t byte) static inline void srslte_crc_checksum_put_byte(srslte_crc_t* h, uint8_t byte)
{ {
// Polynom order 8, 16, 24 or 32 only.
int ord = h->order - 8;
uint64_t crc = h->crcinit; uint64_t crc = h->crcinit;
crc = (crc << 8) ^ h->table[((crc >> (ord)) & 0xff) ^ byte]; uint32_t idx;
if (h->order > 8) {
// For more than 8 bits
uint32_t ord = h->order - 8U;
idx = ((crc >> (ord)) & 0xffU) ^ byte;
} else {
// For 8 bits or less
uint32_t ord = 8U - h->order;
idx = ((crc << (ord)) & 0xffU) ^ byte;
}
crc = (crc << 8U) ^ h->table[idx];
h->crcinit = crc; h->crcinit = crc;
} }

@ -43,7 +43,9 @@
#define SRSLTE_LDPC_BG1_MAX_LEN_CB 8448 /*!< \brief Maximum code block size for LDPC BG1 */ #define SRSLTE_LDPC_BG1_MAX_LEN_CB 8448 /*!< \brief Maximum code block size for LDPC BG1 */
#define SRSLTE_LDPC_BG2_MAX_LEN_CB 3840 /*!< \brief Maximum code block size for LDPC BG2 */ #define SRSLTE_LDPC_BG2_MAX_LEN_CB 3840 /*!< \brief Maximum code block size for LDPC BG2 */
#define SRSLTE_LDPC_MAX_LEN_CB SRSLTE_MAX(SRSLTE_LDPC_BG1_MAX_LEN_CB, SRSLTE_LDPC_BG2_MAX_LEN_CB) #define SRSLTE_LDPC_MAX_LEN_CB \
SRSLTE_MAX(SRSLTE_LDPC_BG1_MAX_LEN_CB, \
SRSLTE_LDPC_BG2_MAX_LEN_CB) /*!< \brief Maximum code block size for LDPC BG1 or BG2 */
#define BG1Nfull 68 /*!< \brief Number of variable nodes in BG1. */ #define BG1Nfull 68 /*!< \brief Number of variable nodes in BG1. */
#define BG1N 66 /*!< \brief Number of variable nodes in BG1 after puncturing. */ #define BG1N 66 /*!< \brief Number of variable nodes in BG1 after puncturing. */

@ -142,8 +142,7 @@ SRSLTE_API int srslte_ldpc_rm_rx_init_s(srslte_ldpc_rm_t* q);
* \param[in] rv Redundancy version 0,1,2,3. * \param[in] rv Redundancy version 0,1,2,3.
* \param[in] mod_type Modulation type. * \param[in] mod_type Modulation type.
* \param[in] Nref Size of limited buffer. * \param[in] Nref Size of limited buffer.
* \param[out] output The rate-dematched codeword resulting from the rate-dematching * \return An integer: 0 if the function executes correctly, -1 otherwise.
* operation.
*/ */
SRSLTE_API int srslte_ldpc_rm_rx_s(srslte_ldpc_rm_t* q, SRSLTE_API int srslte_ldpc_rm_rx_s(srslte_ldpc_rm_t* q,
const int16_t* input, const int16_t* input,

@ -390,7 +390,7 @@ static inline const uint16_t* get_blk_interleaver(uint8_t n)
return blk_interleaver_10; return blk_interleaver_10;
break; break;
default: default:
ERROR("Wrong code_size_log\n"); ERROR("Wrong code_size_log (%d)\n", n);
return NULL; return NULL;
} }
} }

@ -22,7 +22,8 @@
#ifndef SRSLTE_EVM_H_ #ifndef SRSLTE_EVM_H_
#define SRSLTE_EVM_H_ #define SRSLTE_EVM_H_
#include "srslte/config.h" #include "srslte/phy/modem/mod.h"
#include "srslte/phy/modem/modem_table.h"
#include "srslte/phy/phch/ra.h" #include "srslte/phy/phch/ra.h"
#include "srslte/phy/utils/debug.h" #include "srslte/phy/utils/debug.h"
#include "srslte/phy/utils/vector.h" #include "srslte/phy/utils/vector.h"

@ -24,15 +24,7 @@
#include "dci.h" #include "dci.h"
#include "srslte/phy/common/phy_common_nr.h" #include "srslte/phy/common/phy_common_nr.h"
#include "srslte/phy/phch/pdsch_cfg_nr.h" #include "srslte/phy/phch/phch_cfg_nr.h"
typedef enum SRSLTE_API {
srslte_rnti_type_c = 0,
srslte_rnti_type_p,
srslte_rnti_type_si,
srslte_rnti_type_ra,
srslte_rnti_type_tc,
} srslte_rnti_type_t;
typedef struct SRSLTE_API { typedef struct SRSLTE_API {
srslte_dci_location_t location; srslte_dci_location_t location;
@ -45,7 +37,11 @@ typedef struct SRSLTE_API {
} srslte_dci_msg_nr_t; } srslte_dci_msg_nr_t;
typedef struct SRSLTE_API { typedef struct SRSLTE_API {
uint16_t rnti;
srslte_rnti_type_t rnti_type; srslte_rnti_type_t rnti_type;
srslte_dci_format_nr_t format;
srslte_dci_location_t location;
srslte_search_space_t search_space;
// Common fields // Common fields
uint32_t freq_domain_assigment; ///< Frequency domain resource assignment uint32_t freq_domain_assigment; ///< Frequency domain resource assignment
@ -73,6 +69,11 @@ typedef struct SRSLTE_API {
} srslte_dci_dl_nr_t; } srslte_dci_dl_nr_t;
SRSLTE_API int srslte_dci_nr_pack(const srslte_carrier_nr_t* carrier,
const srslte_coreset_t* coreset,
const srslte_dci_dl_nr_t* dci,
srslte_dci_msg_nr_t* msg);
SRSLTE_API SRSLTE_API int srslte_dci_nr_format_1_0_sizeof(const srslte_carrier_nr_t* carrier, SRSLTE_API SRSLTE_API int srslte_dci_nr_format_1_0_sizeof(const srslte_carrier_nr_t* carrier,
const srslte_coreset_t* coreset, const srslte_coreset_t* coreset,
srslte_rnti_type_t rnti_type); srslte_rnti_type_t rnti_type);

@ -31,7 +31,6 @@
#define SRSLTE_PDCCH_NR_H #define SRSLTE_PDCCH_NR_H
#include "dci_nr.h" #include "dci_nr.h"
#include "srslte/config.h"
#include "srslte/phy/ch_estimation/dmrs_pdcch.h" #include "srslte/phy/ch_estimation/dmrs_pdcch.h"
#include "srslte/phy/common/phy_common_nr.h" #include "srslte/phy/common/phy_common_nr.h"
#include "srslte/phy/fec/crc.h" #include "srslte/phy/fec/crc.h"
@ -39,6 +38,8 @@
#include "srslte/phy/fec/polar/polar_decoder.h" #include "srslte/phy/fec/polar/polar_decoder.h"
#include "srslte/phy/fec/polar/polar_encoder.h" #include "srslte/phy/fec/polar/polar_encoder.h"
#include "srslte/phy/fec/polar/polar_rm.h" #include "srslte/phy/fec/polar/polar_rm.h"
#include "srslte/phy/modem/evm.h"
#include "srslte/phy/modem/modem_table.h"
/** /**
* @brief PDCCH configuration initialization arguments * @brief PDCCH configuration initialization arguments

@ -27,12 +27,14 @@
* Reference: 3GPP TS 38.211 V15.8.0 Sec. 7.3.1 * Reference: 3GPP TS 38.211 V15.8.0 Sec. 7.3.1
*****************************************************************************/ *****************************************************************************/
#ifndef srslte_pdsch_nr_H #ifndef SRSLTE_PDSCH_NR_H
#define srslte_pdsch_nr_H #define SRSLTE_PDSCH_NR_H
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/ch_estimation/dmrs_pdsch.h" #include "srslte/phy/ch_estimation/dmrs_sch.h"
#include "srslte/phy/phch/pdsch_cfg_nr.h" #include "srslte/phy/modem/evm.h"
#include "srslte/phy/modem/modem_table.h"
#include "srslte/phy/phch/phch_cfg_nr.h"
#include "srslte/phy/phch/regs.h" #include "srslte/phy/phch/regs.h"
#include "srslte/phy/phch/sch_nr.h" #include "srslte/phy/phch/sch_nr.h"
#include "srslte/phy/scrambling/scrambling.h" #include "srslte/phy/scrambling/scrambling.h"
@ -82,29 +84,29 @@ SRSLTE_API void srslte_pdsch_nr_free(srslte_pdsch_nr_t* q);
SRSLTE_API int srslte_pdsch_nr_set_carrier(srslte_pdsch_nr_t* q, const srslte_carrier_nr_t* carrier); SRSLTE_API int srslte_pdsch_nr_set_carrier(srslte_pdsch_nr_t* q, const srslte_carrier_nr_t* carrier);
SRSLTE_API int srslte_pdsch_nr_encode(srslte_pdsch_nr_t* q, SRSLTE_API int srslte_pdsch_nr_encode(srslte_pdsch_nr_t* q,
const srslte_pdsch_cfg_nr_t* cfg, const srslte_sch_cfg_nr_t* cfg,
const srslte_pdsch_grant_nr_t* grant, const srslte_sch_grant_nr_t* grant,
uint8_t* data[SRSLTE_MAX_TB], uint8_t* data[SRSLTE_MAX_TB],
cf_t* sf_symbols[SRSLTE_MAX_PORTS]); cf_t* sf_symbols[SRSLTE_MAX_PORTS]);
SRSLTE_API int srslte_pdsch_nr_decode(srslte_pdsch_nr_t* q, SRSLTE_API int srslte_pdsch_nr_decode(srslte_pdsch_nr_t* q,
const srslte_pdsch_cfg_nr_t* cfg, const srslte_sch_cfg_nr_t* cfg,
const srslte_pdsch_grant_nr_t* grant, const srslte_sch_grant_nr_t* grant,
srslte_chest_dl_res_t* channel, srslte_chest_dl_res_t* channel,
cf_t* sf_symbols[SRSLTE_MAX_PORTS], cf_t* sf_symbols[SRSLTE_MAX_PORTS],
srslte_pdsch_res_nr_t data[SRSLTE_MAX_TB]); srslte_pdsch_res_nr_t data[SRSLTE_MAX_TB]);
SRSLTE_API uint32_t srslte_pdsch_nr_rx_info(const srslte_pdsch_nr_t* q, SRSLTE_API uint32_t srslte_pdsch_nr_rx_info(const srslte_pdsch_nr_t* q,
const srslte_pdsch_cfg_nr_t* cfg, const srslte_sch_cfg_nr_t* cfg,
const srslte_pdsch_grant_nr_t* grant, const srslte_sch_grant_nr_t* grant,
const srslte_pdsch_res_nr_t* res, const srslte_pdsch_res_nr_t* res,
char* str, char* str,
uint32_t str_len); uint32_t str_len);
SRSLTE_API uint32_t srslte_pdsch_nr_tx_info(const srslte_pdsch_nr_t* q, SRSLTE_API uint32_t srslte_pdsch_nr_tx_info(const srslte_pdsch_nr_t* q,
const srslte_pdsch_cfg_nr_t* cfg, const srslte_sch_cfg_nr_t* cfg,
const srslte_pdsch_grant_nr_t* grant, const srslte_sch_grant_nr_t* grant,
char* str, char* str,
uint32_t str_len); uint32_t str_len);
#endif // srslte_pdsch_nr_H #endif // SRSLTE_PDSCH_NR_H

@ -27,49 +27,45 @@
* Reference: * Reference:
*****************************************************************************/ *****************************************************************************/
#ifndef SRSLTE_PDSCH_CFG_NR_H #ifndef SRSLTE_PHCH_CFG_NR_H
#define SRSLTE_PDSCH_CFG_NR_H #define SRSLTE_PHCH_CFG_NR_H
#include "srslte/phy/common/phy_common_nr.h" #include "srslte/phy/common/phy_common_nr.h"
#include "srslte/phy/phch/sch_cfg_nr.h" #include "srslte/phy/phch/sch_cfg_nr.h"
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* @brief PDSCH DMRS type * @brief PDSCH DMRS type
*/ */
typedef enum { typedef enum {
srslte_dmrs_pdsch_type_1 = 0, // 1 pilot every 2 sub-carriers (default) srslte_dmrs_sch_type_1 = 0, // 1 pilot every 2 sub-carriers (default)
srslte_dmrs_pdsch_type_2 // 2 consecutive pilots every 6 sub-carriers srslte_dmrs_sch_type_2 // 2 consecutive pilots every 6 sub-carriers
} srslte_dmrs_pdsch_type_t; } srslte_dmrs_sch_type_t;
/** /**
* @brief PDSCH DMRS length in symbols * @brief PDSCH DMRS length in symbols
*/ */
typedef enum { typedef enum {
srslte_dmrs_pdsch_len_1 = 0, // single, 1 symbol long (default) srslte_dmrs_sch_len_1 = 0, // single, 1 symbol long (default)
srslte_dmrs_pdsch_len_2 // double, 2 symbol long srslte_dmrs_sch_len_2 // double, 2 symbol long
} srslte_dmrs_pdsch_len_t; } srslte_dmrs_sch_len_t;
/** /**
* @brief Determines whether the first pilot goes into symbol index 2 or 3 * @brief Determines whether the first pilot goes into symbol index 2 or 3
*/ */
typedef enum { typedef enum {
srslte_dmrs_pdsch_typeA_pos_2 = 0, // Start in slot symbol index 2 (default) srslte_dmrs_sch_typeA_pos_2 = 0, // Start in slot symbol index 2 (default)
srslte_dmrs_pdsch_typeA_pos_3 // Start in slot symbol index 3 srslte_dmrs_sch_typeA_pos_3 // Start in slot symbol index 3
} srslte_dmrs_pdsch_typeA_pos_t; } srslte_dmrs_sch_typeA_pos_t;
/** /**
* @brief Determines additional symbols if possible to be added * @brief Determines additional symbols if possible to be added
*/ */
typedef enum { typedef enum {
srslte_dmrs_pdsch_add_pos_2 = 0, srslte_dmrs_sch_add_pos_2 = 0,
srslte_dmrs_pdsch_add_pos_0, srslte_dmrs_sch_add_pos_0,
srslte_dmrs_pdsch_add_pos_1, srslte_dmrs_sch_add_pos_1,
srslte_dmrs_pdsch_add_pos_3 srslte_dmrs_sch_add_pos_3
} srslte_dmrs_pdsch_add_pos_t; } srslte_dmrs_sch_add_pos_t;
/** /**
* @brief Provides PDSCH DMRS configuration from higher layers * @brief Provides PDSCH DMRS configuration from higher layers
@ -77,22 +73,22 @@ typedef enum {
*/ */
typedef struct { typedef struct {
/// Parameters provided by IE DMRS-DownlinkConfig /// Parameters provided by IE DMRS-DownlinkConfig
srslte_dmrs_pdsch_type_t type; srslte_dmrs_sch_type_t type;
srslte_dmrs_pdsch_add_pos_t additional_pos; srslte_dmrs_sch_add_pos_t additional_pos;
srslte_dmrs_pdsch_len_t length; srslte_dmrs_sch_len_t length;
bool scrambling_id0_present; bool scrambling_id0_present;
uint32_t scrambling_id0; uint32_t scrambling_id0;
bool scrambling_id1_present; bool scrambling_id1_present;
uint32_t scrambling_id1; uint32_t scrambling_id1;
/// Parameters provided by ServingCellConfigCommon /// Parameters provided by ServingCellConfigCommon
srslte_dmrs_pdsch_typeA_pos_t typeA_pos; srslte_dmrs_sch_typeA_pos_t typeA_pos;
bool lte_CRS_to_match_around; bool lte_CRS_to_match_around;
/// Parameters provided by FeatureSetDownlink-v1540 /// Parameters provided by FeatureSetDownlink-v1540
bool additional_DMRS_DL_Alt; bool additional_DMRS_DL_Alt;
} srslte_pdsch_dmrs_cfg_t; } srslte_dmrs_sch_cfg_t;
/** /**
* @brief flatten PDSCH time domain allocation parameters * @brief flatten PDSCH time domain allocation parameters
@ -103,13 +99,13 @@ typedef struct SRSLTE_API {
uint32_t k0; uint32_t k0;
/// PDSCH mapping type /// PDSCH mapping type
srslte_pdsch_mapping_type_t mapping_type; srslte_sch_mapping_type_t mapping_type;
/// An index giving valid combinations of start symbol and length (jointly encoded) as start and length indicator /// An index giving valid combinations of start symbol and length (jointly encoded) as start and length indicator
/// (SLIV). The network configures the field so that the allocation does not cross the slot boundary /// (SLIV). The network configures the field so that the allocation does not cross the slot boundary
uint32_t sliv; uint32_t sliv;
} srslte_pdsch_allocation_t; } srslte_pdsch_time_ra_t;
/** /**
* @brief PDSCH grant information provided by the Downlink Control Information (DCI) * @brief PDSCH grant information provided by the Downlink Control Information (DCI)
@ -117,15 +113,22 @@ typedef struct SRSLTE_API {
typedef struct SRSLTE_API { typedef struct SRSLTE_API {
/// UE identifier /// UE identifier
uint16_t rnti; uint16_t rnti;
srslte_rnti_type_t rnti_type;
/// Time domain resources /// Time domain resources
uint32_t k0; uint32_t k0; // PDSCH only
uint32_t k2; // PUSCH only
uint32_t S; uint32_t S;
uint32_t L; uint32_t L;
srslte_pdsch_mapping_type_t mapping; srslte_sch_mapping_type_t mapping;
/// Frequency domain resources /// Frequency domain resources
bool prb_idx[SRSLTE_MAX_PRB_NR]; bool prb_idx[SRSLTE_MAX_PRB_NR];
uint32_t nof_prb;
/// Number of DMRS groups without data
/// Described in TS 38.214 Section 5.1.6.2
uint32_t nof_dmrs_cdm_groups_without_data;
/// Spatial resources /// Spatial resources
uint32_t nof_layers; uint32_t nof_layers;
@ -142,25 +145,32 @@ typedef struct SRSLTE_API {
/// .... /// ....
srslte_sch_tb_t tb[SRSLTE_MAX_TB]; srslte_sch_tb_t tb[SRSLTE_MAX_TB];
} srslte_pdsch_grant_nr_t; } srslte_sch_grant_nr_t;
/** /**
* @brief flatten PDSCH configuration parameters provided by higher layers * @brief flatten SCH configuration parameters provided by higher layers
* @remark Described in TS 38.331 V15.10.0 Section PDSCH-Config * @remark Described in TS 38.331 V15.10.0 Section PDSCH-Config
* @remark Described in TS 38.331 V15.10.0 Section PUSCH-Config
*/ */
typedef struct SRSLTE_API { typedef struct SRSLTE_API {
bool scrambling_id_present; bool scrambling_id_present;
uint32_t scambling_id; // Identifier used to initialize data scrambling (0-1023) uint32_t scambling_id; // Identifier used to initialize data scrambling (0-1023)
srslte_pdsch_dmrs_cfg_t dmrs_cfg_typeA; srslte_dmrs_sch_cfg_t dmrs_typeA;
srslte_pdsch_dmrs_cfg_t dmrs_cfg_typeB; srslte_dmrs_sch_cfg_t dmrs_typeB;
srslte_sch_grant_nr_t grant;
bool pdsch_time_is_default; ///< Set to true if pdsch_time_ra contains the configuration from pdsch-ConfigCommon or
///< pdsch-Config
srslte_pdsch_time_ra_t pdsch_time_ra[SRSLTE_MAX_NOF_DL_ALLOCATION];
bool rbg_size_cfg_1; ///< RBG size configuration (1 or 2)
srslte_sch_cfg_t sch_cfg; ///< Common shared channel parameters srslte_sch_cfg_t sch_cfg; ///< Common shared channel parameters
} srslte_pdsch_cfg_nr_t;
#ifdef __cplusplus /// Uplink params
} bool enable_transform_precoder;
#endif } srslte_sch_cfg_nr_t;
#endif // SRSLTE_PDSCH_CFG_NR_H #endif // SRSLTE_PHCH_CFG_NR_H

@ -54,6 +54,7 @@ typedef struct {
typedef struct SRSLTE_API { typedef struct SRSLTE_API {
// Parameters from higher layers (extracted from SIB2) // Parameters from higher layers (extracted from SIB2)
bool is_nr;
uint32_t config_idx; uint32_t config_idx;
uint32_t f; // preamble format uint32_t f; // preamble format
uint32_t rsi; // rootSequenceIndex uint32_t rsi; // rootSequenceIndex
@ -124,6 +125,7 @@ typedef enum SRSLTE_API {
} srslte_prach_sfn_t; } srslte_prach_sfn_t;
typedef struct { typedef struct {
bool is_nr; // Set to true if NR
uint32_t config_idx; uint32_t config_idx;
uint32_t root_seq_idx; uint32_t root_seq_idx;
uint32_t zero_corr_zone; uint32_t zero_corr_zone;
@ -176,21 +178,6 @@ SRSLTE_API void srslte_prach_sf_config(uint32_t config_idx, srslte_prach_sf_conf
SRSLTE_API int srslte_prach_init(srslte_prach_t* p, uint32_t max_N_ifft_ul); SRSLTE_API int srslte_prach_init(srslte_prach_t* p, uint32_t max_N_ifft_ul);
SRSLTE_API int srslte_prach_set_cell_fdd(srslte_prach_t* p,
uint32_t N_ifft_ul,
uint32_t config_idx,
uint32_t root_seq_index,
bool high_speed_flag,
uint32_t zero_corr_zone_config);
SRSLTE_API int srslte_prach_set_cell_tdd(srslte_prach_t* p,
uint32_t N_ifft_ul,
uint32_t config_idx,
uint32_t root_seq_index,
bool high_speed_flag,
uint32_t zero_corr_zone_config,
srslte_tdd_config_t* tdd_config);
SRSLTE_API int srslte_prach_set_cfg(srslte_prach_t* p, srslte_prach_cfg_t* cfg, uint32_t nof_prb); SRSLTE_API int srslte_prach_set_cfg(srslte_prach_t* p, srslte_prach_cfg_t* cfg, uint32_t nof_prb);
SRSLTE_API int srslte_prach_gen(srslte_prach_t* p, uint32_t seq_index, uint32_t freq_offset, cf_t* signal); SRSLTE_API int srslte_prach_gen(srslte_prach_t* p, uint32_t seq_index, uint32_t freq_offset, cf_t* signal);

@ -81,7 +81,6 @@ typedef struct SRSLTE_API {
cf_t d[SRSLTE_PUCCH_MAX_BITS / 2]; cf_t d[SRSLTE_PUCCH_MAX_BITS / 2];
uint32_t n_cs_cell[SRSLTE_NSLOTS_X_FRAME][SRSLTE_CP_NORM_NSYMB]; uint32_t n_cs_cell[SRSLTE_NSLOTS_X_FRAME][SRSLTE_CP_NORM_NSYMB];
uint32_t f_gh[SRSLTE_NSLOTS_X_FRAME]; uint32_t f_gh[SRSLTE_NSLOTS_X_FRAME];
float tmp_arg[SRSLTE_PUCCH_N_SEQ];
cf_t* z; cf_t* z;
cf_t* z_tmp; cf_t* z_tmp;
@ -92,6 +91,7 @@ typedef struct SRSLTE_API {
typedef struct SRSLTE_API { typedef struct SRSLTE_API {
srslte_uci_value_t uci_data; srslte_uci_value_t uci_data;
float dmrs_correlation; float dmrs_correlation;
float snr_db;
float correlation; float correlation;
bool detected; bool detected;

@ -0,0 +1,136 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#ifndef SRSLTE_PUCCH_CFG_NR_H
#define SRSLTE_PUCCH_CFG_NR_H
#include "srslte/config.h"
#include <stdbool.h>
#include <stdint.h>
/**
* NR-PUCCH Format 0 ranges
*/
#define SRSLTE_PUCCH_NR_FORMAT0_MAX_CS 11
#define SRSLTE_PUCCH_NR_FORMAT0_MIN_NSYMB 1
#define SRSLTE_PUCCH_NR_FORMAT0_MAX_NSYMB 2
#define SRSLTE_PUCCH_NR_FORMAT0_MAX_STARTSYMB 13
/**
* NR-PUCCH Format 1 ranges
*/
#define SRSLTE_PUCCH_NR_FORMAT1_MAX_CS 11
#define SRSLTE_PUCCH_NR_FORMAT1_MAX_TOCC 6
#define SRSLTE_PUCCH_NR_FORMAT1_MIN_NSYMB 4
#define SRSLTE_PUCCH_NR_FORMAT1_MAX_NSYMB 14
#define SRSLTE_PUCCH_NR_FORMAT1_MAX_STARTSYMB 10
#define SRSLTE_PUCCH_NR_FORMAT1_MAX_NOF_BITS 2
/**
* NR-PUCCH Format 2 ranges
*/
#define SRSLTE_PUCCH_NR_FORMAT2_MIN_NPRB 1
#define SRSLTE_PUCCH_NR_FORMAT2_MAX_NPRB 16
#define SRSLTE_PUCCH_NR_FORMAT2_MIN_NSYMB 1
#define SRSLTE_PUCCH_NR_FORMAT2_MAX_NSYMB 2
#define SRSLTE_PUCCH_NR_FORMAT2_MAX_STARTSYMB 13
#define SRSLTE_PUCCH_NR_FORMAT2_MIN_NOF_BITS 3
/**
* NR-PUCCH Format 3 ranges
*/
#define SRSLTE_PUCCH_NR_FORMAT3_MIN_NPRB 1
#define SRSLTE_PUCCH_NR_FORMAT3_MAX_NPRB 16
#define SRSLTE_PUCCH_NR_FORMAT3_MIN_NSYMB 4
#define SRSLTE_PUCCH_NR_FORMAT3_MAX_NSYMB 14
#define SRSLTE_PUCCH_NR_FORMAT3_MAX_STARTSYMB 10
/**
* NR-PUCCH Format 4 ranges
*/
#define SRSLTE_PUCCH_NR_FORMAT4_NPRB 1
#define SRSLTE_PUCCH_NR_FORMAT4_MIN_NSYMB 4
#define SRSLTE_PUCCH_NR_FORMAT4_MAX_NSYMB 14
#define SRSLTE_PUCCH_NR_FORMAT4_MAX_STARTSYMB 10
/**
* NR-PUCCH Formats 2, 3 and 4 code rate range
*/
#define SRSLTE_PUCCH_NR_MAX_CODE_RATE 7
typedef enum SRSLTE_API {
SRSLTE_PUCCH_NR_FORMAT_0 = 0,
SRSLTE_PUCCH_NR_FORMAT_1,
SRSLTE_PUCCH_NR_FORMAT_2,
SRSLTE_PUCCH_NR_FORMAT_3,
SRSLTE_PUCCH_NR_FORMAT_4,
SRSLTE_PUCCH_NR_FORMAT_ERROR,
} srslte_pucch_nr_format_t;
typedef enum SRSLTE_API {
SRSLTE_PUCCH_NR_GROUP_HOPPING_NEITHER = 0,
SRSLTE_PUCCH_NR_GROUP_HOPPING_ENABLE,
SRSLTE_PUCCH_NR_GROUP_HOPPING_DISABLE
} srslte_pucch_nr_group_hopping_t;
/**
* @brief PUCCH Common configuration
* @remark Defined in TS 38.331 PUCCH-ConfigCommon
*/
typedef struct SRSLTE_API {
uint32_t resource_common; ///< Configures a set of cell-specific PUCCH resources/parameters
srslte_pucch_nr_group_hopping_t group_hopping; ///< Configuration of group and sequence hopping
uint32_t hopping_id; ///< Cell-specific scrambling ID for group hopping and sequence hopping if enabled
bool hopping_id_present;
float p0_nominal; ///< Power control parameter P0 for PUCCH transmissions. Value in dBm. (-202..24)
// From PUSCH-config
bool scrambling_id_present;
uint32_t scambling_id; // Identifier used to initialize data scrambling (dataScramblingIdentityPUSCH, 0-1023)
} srslte_pucch_nr_common_cfg_t;
/**
* @brief Generic PUCCH Resource configuration
* @remark Defined in TS 38.331 PUCCH-Config
*/
typedef struct SRSLTE_API {
// Common PUCCH-Resource parameter
uint32_t starting_prb;
bool intra_slot_hopping;
uint32_t second_hop_prb;
// Common PUCCH-Resource parameters among all formats
srslte_pucch_nr_format_t format; ///< PUCCH format this configuration belongs
uint32_t nof_symbols; ///< Number of symbols
uint32_t start_symbol_idx; ///< Starting symbol index
// Specific PUCCH-Resource
uint32_t initial_cyclic_shift; ///< Used by formats 0, 1
uint32_t time_domain_occ; ///< Used by format 1
uint32_t nof_prb; ///< Used by formats 2, 3
uint32_t occ_lenth; ///< Spreading factor, used by format 4 (2, 4). Also called N_PUCCH4_SF
uint32_t occ_index; ///< Used by format 4
// PUCCH Format common parameters
bool enable_pi_bpsk; ///< Enables PI-BPSK
uint32_t max_code_rate; ///< Maximum code rate r (0..7)
bool additional_dmrs; ///< UE enables 2 DMRS symbols per hop of a PUCCH Format 3 or 4
} srslte_pucch_nr_resource_t;
/**
* @brief Validates an NR-PUCCH resource configuration provided by upper layers
* @param resource Resource configuration to validate
* @return SRSLTE_SUCCESS if valid, SRSLTE_ERROR code otherwise
*/
SRSLTE_API int srslte_pucch_nr_cfg_resource_valid(const srslte_pucch_nr_resource_t* resource);
#endif // SRSLTE_PUCCH_CFG_NR_H

@ -0,0 +1,244 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#ifndef SRSLTE_PUCCH_NR_H
#define SRSLTE_PUCCH_NR_H
#include "srslte/phy/ch_estimation/chest_ul.h"
#include "srslte/phy/common/phy_common_nr.h"
#include "srslte/phy/common/zc_sequence.h"
#include "srslte/phy/modem/modem_table.h"
#include "srslte/phy/phch/uci_nr.h"
/**
* @brief Maximum number of symbols (without DMRS) that NR-PUCCH format 1 can transmit
*/
#define SRSLTE_PUCCH_NR_FORMAT1_N_MAX 7
typedef struct SRSLTE_API {
srslte_uci_nr_args_t uci;
uint32_t max_nof_prb;
} srslte_pucch_nr_args_t;
typedef struct SRSLTE_API {
float rsrp;
float rsrp_dBfs;
float epre;
float epre_dBfs;
float norm_corr;
} srslte_pucch_nr_measure_t;
/**
* @brief NR-PUCCH encoder/decoder object
*/
typedef struct SRSLTE_API {
uint32_t max_prb;
srslte_zc_sequence_lut_t r_uv_1prb;
cf_t format1_w_i_m[SRSLTE_PUCCH_NR_FORMAT1_N_MAX][SRSLTE_PUCCH_NR_FORMAT1_N_MAX][SRSLTE_PUCCH_NR_FORMAT1_N_MAX];
srslte_modem_table_t bpsk;
srslte_modem_table_t qpsk;
srslte_uci_nr_t uci;
uint8_t* b;
cf_t* d;
cf_t* ce;
} srslte_pucch_nr_t;
/**
* @brief Initialises an NR-PUCCH encoder/decoder object
* @param q Object
* @return SRSLTE_SUCCESS if successful, SRSLTE_ERROR code otherwise
*/
SRSLTE_API int srslte_pucch_nr_init(srslte_pucch_nr_t* q, const srslte_pucch_nr_args_t* args);
/**
* @brief Deallocates an NR-PUCCH encoder/decoder object
* @param q Object
*/
SRSLTE_API void srslte_pucch_nr_free(srslte_pucch_nr_t* q);
/**
* @brief Computes the NR-PUCCH group sequence
* @remark Implemented according to TS 38.211 clause 6.3.2.2.1 Group and sequence hopping
* @param[in] carrier Serving cell and UL BWP configuration
* @param[in] cfg PUCCH common configuration
* @param[out] u_ Group sequence (u)
* @param[out] v_ Base sequence (v)
* @return SRSLTE_SUCCESS if provide arguments are right, SRSLTE_ERROR code otherwise
*/
SRSLTE_API int srslte_pucch_nr_group_sequence(const srslte_carrier_nr_t* carrier,
const srslte_pucch_nr_common_cfg_t* cfg,
uint32_t* u_,
uint32_t* v_);
/**
* @brief Computes the NR alpha index (1-NRE)
* @param[in] carrier Serving cell and UL BWP configuration
* @param[in] cfg PUCCH common configuration
* @param[in] slot slot configuration
* @param[in] l OFDM Symbol, relative to the NR-PUCCH transmission start
* @param[in] l_prime Initial OFDM symbol, relative to the transmission slot start
* @param[in] m0 Initial cyclic shift
* @param[in] m_cs Set to zero expect for format 0
* @param[out] alpha_idx Computed alpha index
* @return SRSLTE_SUCCESS if provide arguments are right, SRSLTE_ERROR code otherwise
*/
SRSLTE_API int srslte_pucch_nr_alpha_idx(const srslte_carrier_nr_t* carrier,
const srslte_pucch_nr_common_cfg_t* cfg,
const srslte_dl_slot_cfg_t* slot,
uint32_t l,
uint32_t l_prime,
uint32_t m0,
uint32_t m_cs,
uint32_t* alpha_idx);
/**
* @brief Encode and writes NR-PUCCH format 0 in the resource grid
* @remark Described in TS 38.211 clause 6.3.2.3 PUCCH format 0
* @param[in,out] q NR-PUCCH encoder/decoder object
* @param[in] carrier Serving cell and Uplink BWP configuration
* @param[in] cfg PUCCH common configuration
* @param[in] slot slot configuration
* @param[in] resource PUCCH format 0 resource
* @param[in] m_cs Cyclic shift according to TS 38.213 clause 5
* @param[out] slot_symbols Resource grid of the given slot
* @return SRSLTE_SUCCESS if successful, SRSLTE_ERROR code otherwise
*/
SRSLTE_API int srslte_pucch_nr_format0_encode(const srslte_pucch_nr_t* q,
const srslte_carrier_nr_t* carrier,
const srslte_pucch_nr_common_cfg_t* cfg,
const srslte_dl_slot_cfg_t* slot,
srslte_pucch_nr_resource_t* resource,
uint32_t m_cs,
cf_t* slot_symbols);
/**
* @brief Measures PUCCH format 0 in the resource grid
* @param[in,out] q NR-PUCCH encoder/decoder object
* @param[in] carrier Serving cell and Uplink BWP configuration
* @param[in] cfg PUCCH common configuration
* @param[in] slot slot configuration
* @param[in] resource PUCCH format 0 resource
* @param[in] m_cs Cyclic shift according to TS 38.213 clause 5
* @param[in] slot_symbols Resource grid of the given slot
* @param[out] measure Measurement structure
* @return SRSLTE_SUCCESS if successful, SRSLTE_ERROR code otherwise
*/
SRSLTE_API int srslte_pucch_nr_format0_measure(const srslte_pucch_nr_t* q,
const srslte_carrier_nr_t* carrier,
const srslte_pucch_nr_common_cfg_t* cfg,
const srslte_dl_slot_cfg_t* slot,
srslte_pucch_nr_resource_t* resource,
uint32_t m_cs,
const cf_t* slot_symbols,
srslte_pucch_nr_measure_t* measure);
/**
* @brief Get NR-PUCCH orthogonal sequence w
* @remark Defined by TS 38.211 Table 6.3.2.4.1-2: Orthogonal sequences ... for PUCCH format 1
* @param[in,out] q NR-PUCCH encoder/decoder object
* @param[in] n_pucch Number of PUCCH symbols
* @param[in] i sequence index
* @param m OFDM symbol index
* @return Orthogonal sequence complex number if valid, NAN otherwise
*/
SRSLTE_API cf_t srslte_pucch_nr_format1_w(const srslte_pucch_nr_t* q, uint32_t n_pucch, uint32_t i, uint32_t m);
/**
* @brief Encodes and puts NR-PUCCH format 1 in the resource grid
* @remark Described in TS 38.211 clause 6.3.2.4 PUCCH format 1
* @param[in,out] q NR-PUCCH encoder/decoder object
* @param[in] carrier Serving cell and Uplink BWP configuration
* @param[in] cfg PUCCH common configuration
* @param[in] slot slot configuration
* @param[in] resource PUCCH format 1 resource
* @param[in] b Bits to encode in the message
* @param[in] nof_bits Number of bits to encode in the message
* @param[out] slot_symbols Resource grid of the given slot
* @return SRSLTE_SUCCESS if successful, SRSLTE_ERROR code otherwise
*/
SRSLTE_API int srslte_pucch_nr_format1_encode(const srslte_pucch_nr_t* q,
const srslte_carrier_nr_t* carrier,
const srslte_pucch_nr_common_cfg_t* cfg,
const srslte_dl_slot_cfg_t* slot,
const srslte_pucch_nr_resource_t* resource,
uint8_t* b,
uint32_t nof_bits,
cf_t* slot_symbols);
/**
* @brief Decodes NR-PUCCH format 1
* @param[in,out] q NR-PUCCH encoder/decoder object
* @param[in] carrier Serving cell and Uplink BWP configuration
* @param[in] cfg PUCCH common configuration
* @param[in] slot slot configuration
* @param[in] resource PUCCH format 2-4 resource
* @param[in] chest_res Channel estimator result
* @param[in] slot_symbols Resource grid of the given slot
* @param[out] b Bits to decode
* @param[in] nof_bits Number of bits to decode in the message
* @return SRSLTE_SUCCESS if successful, SRSLTE_ERROR code otherwise
*/
SRSLTE_API int srslte_pucch_nr_format1_decode(srslte_pucch_nr_t* q,
const srslte_carrier_nr_t* carrier,
const srslte_pucch_nr_common_cfg_t* cfg,
const srslte_dl_slot_cfg_t* slot,
const srslte_pucch_nr_resource_t* resource,
srslte_chest_ul_res_t* chest_res,
cf_t* slot_symbols,
uint8_t b[SRSLTE_PUCCH_NR_FORMAT1_MAX_NOF_BITS],
uint32_t nof_bits);
/**
* @brief Encoder NR-PUCCH formats 2, 3 and 4. The NR-PUCCH format is selected by resource->format.
* @param[in,out] q NR-PUCCH encoder/decoder object
* @param[in] carrier Serving cell and Uplink BWP configuration
* @param[in] cfg PUCCH common configuration
* @param[in] slot slot configuration
* @param[in] resource PUCCH format 1 resource
* @param[in] uci_cfg Uplink Control Information configuration
* @param[in] uci_value Uplink Control Information data
* @param[out] slot_symbols Resource grid of the given slot
* @return SRSLTE_SUCCESS if successful, SRSLTE_ERROR code otherwise
*/
SRSLTE_API int srslte_pucch_nr_format_2_3_4_encode(srslte_pucch_nr_t* q,
const srslte_carrier_nr_t* carrier,
const srslte_pucch_nr_common_cfg_t* cfg,
const srslte_dl_slot_cfg_t* slot,
const srslte_pucch_nr_resource_t* resource,
const srslte_uci_cfg_nr_t* uci_cfg,
const srslte_uci_value_nr_t* uci_value,
cf_t* slot_symbols);
/**
* @brief Decode NR-PUCCH format 2, 3, and 4. The NR-PUCCH format is selected by resource->format.
* @param q[in,out] q NR-PUCCH encoder/decoder
* @param[in] carrier Serving cell and Uplink BWP configuration
* @param[in] cfg PUCCH common configuration
* @param[in] slot slot configuration
* @param[in] resource PUCCH format 2-4 resource
* @param[in] uci_cfg Uplink Control Information configuration
* @param[in] chest_res Channel estimator result
* @param[in] slot_symbols Resource grid of the given slot
* @param[out] uci_value Uplink Control Information data
* @return SRSLTE_SUCCESS if successful, SRSLTE_ERROR code otherwise
*/
SRSLTE_API int srslte_pucch_nr_format_2_3_4_decode(srslte_pucch_nr_t* q,
const srslte_carrier_nr_t* carrier,
const srslte_pucch_nr_common_cfg_t* cfg,
const srslte_dl_slot_cfg_t* slot,
const srslte_pucch_nr_resource_t* resource,
const srslte_uci_cfg_nr_t* uci_cfg,
srslte_chest_ul_res_t* chest_res,
cf_t* slot_symbols,
srslte_uci_value_nr_t* uci_value);
#endif // SRSLTE_PUCCH_NR_H

@ -0,0 +1,95 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#ifndef SRSLTE_PUSCH_NR_H
#define SRSLTE_PUSCH_NR_H
#include "srslte/config.h"
#include "srslte/phy/ch_estimation/dmrs_sch.h"
#include "srslte/phy/modem/evm.h"
#include "srslte/phy/modem/modem_table.h"
#include "srslte/phy/phch/phch_cfg_nr.h"
#include "srslte/phy/phch/regs.h"
#include "srslte/phy/phch/sch_nr.h"
#include "srslte/phy/scrambling/scrambling.h"
/**
* @brief PUSCH encoder and decoder initialization arguments
*/
typedef struct SRSLTE_API {
srslte_sch_nr_args_t sch;
bool measure_evm;
bool measure_time;
} srslte_pusch_nr_args_t;
/**
* @brief PDSCH NR object
*/
typedef struct SRSLTE_API {
uint32_t max_prb; ///< Maximum number of allocated prb
uint32_t max_layers; ///< Maximum number of allocated layers
uint32_t max_cw; ///< Maximum number of allocated code words
srslte_carrier_nr_t carrier; ///< NR carrier configuration
srslte_sch_nr_t sch; ///< SCH Encoder/Decoder Object
uint8_t* b[SRSLTE_MAX_CODEWORDS]; ///< SCH Encoded and scrambled data
cf_t* d[SRSLTE_MAX_CODEWORDS]; ///< PDSCH modulated bits
cf_t* x[SRSLTE_MAX_LAYERS_NR]; ///< PDSCH modulated bits
srslte_modem_table_t modem_tables[SRSLTE_MOD_NITEMS]; ///< Modulator tables
srslte_evm_buffer_t* evm_buffer;
bool meas_time_en;
uint32_t meas_time_us;
} srslte_pusch_nr_t;
/**
*
*/
typedef struct {
uint8_t* payload;
bool crc;
float evm;
} srslte_pusch_res_nr_t;
SRSLTE_API int srslte_pusch_nr_init_enb(srslte_pusch_nr_t* q, const srslte_pusch_nr_args_t* args);
SRSLTE_API int srslte_pusch_nr_init_ue(srslte_pusch_nr_t* q, const srslte_pusch_nr_args_t* args);
SRSLTE_API void srslte_pusch_nr_free(srslte_pusch_nr_t* q);
SRSLTE_API int srslte_pusch_nr_set_carrier(srslte_pusch_nr_t* q, const srslte_carrier_nr_t* carrier);
SRSLTE_API int srslte_pusch_nr_encode(srslte_pusch_nr_t* q,
const srslte_sch_cfg_nr_t* cfg,
const srslte_sch_grant_nr_t* grant,
uint8_t* data[SRSLTE_MAX_TB],
cf_t* sf_symbols[SRSLTE_MAX_PORTS]);
SRSLTE_API int srslte_pusch_nr_decode(srslte_pusch_nr_t* q,
const srslte_sch_cfg_nr_t* cfg,
const srslte_sch_grant_nr_t* grant,
srslte_chest_dl_res_t* channel,
cf_t* sf_symbols[SRSLTE_MAX_PORTS],
srslte_pusch_res_nr_t data[SRSLTE_MAX_TB]);
SRSLTE_API uint32_t srslte_pusch_nr_rx_info(const srslte_pusch_nr_t* q,
const srslte_sch_cfg_nr_t* cfg,
const srslte_sch_grant_nr_t* grant,
const srslte_pusch_res_nr_t* res,
char* str,
uint32_t str_len);
SRSLTE_API uint32_t srslte_pusch_nr_tx_info(const srslte_pusch_nr_t* q,
const srslte_sch_cfg_nr_t* cfg,
const srslte_sch_grant_nr_t* grant,
char* str,
uint32_t str_len);
#endif // SRSLTE_PUSCH_NR_H

@ -57,6 +57,8 @@ srslte_ra_dl_grant_to_grant_prb_allocation(const srslte_dci_dl_t* dci, srslte_pd
/** Functions used by the eNodeB scheduler */ /** Functions used by the eNodeB scheduler */
SRSLTE_API uint32_t srslte_ra_dl_approx_nof_re(const srslte_cell_t* cell, uint32_t nof_prb, uint32_t nof_ctrl_symbols); SRSLTE_API uint32_t srslte_ra_dl_approx_nof_re(const srslte_cell_t* cell, uint32_t nof_prb, uint32_t nof_ctrl_symbols);
SRSLTE_API uint32_t ra_re_x_prb(const srslte_cell_t* cell, srslte_dl_sf_cfg_t* sf, uint32_t slot, uint32_t prb_idx);
SRSLTE_API uint32_t srslte_ra_dl_grant_nof_re(const srslte_cell_t* cell, SRSLTE_API uint32_t srslte_ra_dl_grant_nof_re(const srslte_cell_t* cell,
srslte_dl_sf_cfg_t* sf, srslte_dl_sf_cfg_t* sf,
srslte_pdsch_grant_t* grant); srslte_pdsch_grant_t* grant);

@ -0,0 +1,91 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
/******************************************************************************
* @file ue_dl_nr.h
*
* Description: NR UE downlink physical layer procedures for data
*
* This module is a frontend to all the downlink data channel processing modules.
*
* Reference:
*****************************************************************************/
#ifndef SRSLTE_RA_DL_NR_H
#define SRSLTE_RA_DL_NR_H
#include "srslte/phy/common/phy_common_nr.h"
#include "srslte/phy/phch/dci_nr.h"
#include "srslte/phy/phch/phch_cfg_nr.h"
/**
* @brief Calculates the PDSCH time resource allocation and stores it in the provided PDSCH NR grant.
*
* @remark Defined by TS 38.214 V15.10.0 section 5.1.2.1.1 Determination of the resource allocation table to be used for
* PDSCH
*
* @param pdsch_cfg Flattened PDSCH configuration provided from higher layers
* @param rnti_type Type of the RNTI of the corresponding DCI
* @param ss_type Type of the SS for PDCCH
* @param m Time domain resource assignment field value m provided in DCI
* @param[out] Provides grant pointer to fill
* @return Returns SRSLTE_SUCCESS if the provided allocation is valid, otherwise it returns SRSLTE_ERROR code
*/
SRSLTE_API int srslte_ra_dl_nr_time(const srslte_sch_cfg_nr_t* pdsch_cfg,
const srslte_rnti_type_t rnti_type,
const srslte_search_space_type_t ss_type,
const uint8_t m,
srslte_sch_grant_nr_t* grant);
/**
* @brief Calculates the PDSCH time resource default A and stores it in the provided PDSCH NR grant. This can be used by
* SI-RNTI, RA-RNTI, P-RNTI and C-RNTI. See Table 5.1.2.1.1-1 for more details about the usage.
*
* @remark Defined by TS 38.214 V15.10.0 Table 5.1.2.1.1-2: Default PDSCH time domain resource allocation A for normal
* CP
*
* @param m Time domain resource assignment field value m of the DCI
* @param dmrs_typeA_pos DMRS TypeA position provided by higher layers
* @param[out] grant PDSCH mapping type
* @return Returns SRSLTE_SUCCESS if the provided allocation is valid, otherwise it returns SRSLTE_ERROR code
*/
SRSLTE_API int
srslte_ra_dl_nr_time_default_A(uint32_t m, srslte_dmrs_sch_typeA_pos_t dmrs_typeA_pos, srslte_sch_grant_nr_t* grant);
/**
* @brief Calculates the number of PDSCH-DMRS CDM groups without data for DCI format 1_0
*
* @remark Defined by TS 38.214 V15.10.0 5.1.6.1.3 CSI-RS for mobility
*
* @param pdsch_cfg PDSCH NR configuration by upper layers
* @param[out] grant Provides grant pointer to fill
* @return Returns SRSLTE_SUCCESS if the provided data is valid, otherwise it returns SRSLTE_ERROR code
*/
SRSLTE_API int srslte_ra_dl_nr_nof_dmrs_cdm_groups_without_data_format_1_0(const srslte_sch_cfg_nr_t* pdsch_cfg,
srslte_sch_grant_nr_t* grant);
/**
* @brief Calculates the PDSCH frequency resource allocation and stores it in the provided PDSCH NR grant.
*
* @remark Defined by TS 38.214 V15.10.0 section 5.1.2.2
* @param carrier Carrier information
* @param cfg PDSCH NR configuration by upper layers
* @param dci_dl Unpacked DCI used to schedule the PDSCH grant
* @param[out] grant Provides grant pointer to fill
* @return
*/
SRSLTE_API int srslte_ra_dl_nr_freq(const srslte_carrier_nr_t* carrier,
const srslte_sch_cfg_nr_t* cfg,
const srslte_dci_dl_nr_t* dci_dl,
srslte_sch_grant_nr_t* grant);
#endif // SRSLTE_RA_DL_NR_H

@ -35,11 +35,38 @@
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/common/phy_common_nr.h" #include "srslte/phy/common/phy_common_nr.h"
#include "srslte/phy/phch/pdsch_cfg_nr.h" #include "srslte/phy/phch/dci_nr.h"
#include "srslte/phy/phch/phch_cfg_nr.h"
#ifdef __cplusplus /**
extern "C" { * @brief Determines target rate
#endif * @param mcs_table Configured MCS table
* @param dci_format DCI format used for the grant
* @param search_space_type Search space type
* @param rnti_type RNTI type
* @param mcs_idx Desired Modulation Coding Scheme (MCS) index
* @return The target rate if provided information is valid. Otherwise, it returns NAN
*/
SRSLTE_API double srslte_ra_nr_R_from_mcs(srslte_mcs_table_t mcs_table,
srslte_dci_format_nr_t dci_format,
srslte_search_space_type_t search_space_type,
srslte_rnti_type_t rnti_type,
uint32_t mcs_idx);
/**
* @brief Determines target rate
* @param mcs_table Configured MCS table
* @param dci_format DCI format used for the grant
* @param search_space_type Search space type
* @param rnti_type RNTI type
* @param mcs_idx Desired Modulation Coding Scheme (MCS) index
* @return The selected modulation if provided information is valid. Otherwise, it returns SRSLTE_MOD_NITEMS
*/
SRSLTE_API srslte_mod_t srslte_ra_nr_mod_from_mcs(srslte_mcs_table_t mcs_table,
srslte_dci_format_nr_t dci_format,
srslte_search_space_type_t search_space_type,
srslte_rnti_type_t rnti_type,
uint32_t mcs_idx);
/** /**
* @brief Determines the number of resource elements available for a given PDSCH transmission * @brief Determines the number of resource elements available for a given PDSCH transmission
@ -47,8 +74,7 @@ extern "C" {
* @param grant The given PDSCH transmission grant * @param grant The given PDSCH transmission grant
* @return The number of resource elements if the provided configuration is valid, otherwise SRSLTE_ERROR code * @return The number of resource elements if the provided configuration is valid, otherwise SRSLTE_ERROR code
*/ */
SRSLTE_API int srslte_ra_dl_nr_slot_nof_re(const srslte_pdsch_cfg_nr_t* pdsch_cfg, SRSLTE_API int srslte_ra_dl_nr_slot_nof_re(const srslte_sch_cfg_nr_t* pdsch_cfg, const srslte_sch_grant_nr_t* grant);
const srslte_pdsch_grant_nr_t* grant);
/** /**
* @brief Calculates shared channel TBS * @brief Calculates shared channel TBS
@ -61,13 +87,26 @@ SRSLTE_API int srslte_ra_dl_nr_slot_nof_re(const srslte_pdsch_cfg_nr_t* pdsch_
*/ */
SRSLTE_API uint32_t srslte_ra_nr_tbs(uint32_t N_re, double S, double R, uint32_t Qm, uint32_t nof_layers); SRSLTE_API uint32_t srslte_ra_nr_tbs(uint32_t N_re, double S, double R, uint32_t Qm, uint32_t nof_layers);
SRSLTE_API int srslte_ra_nr_fill_tb(const srslte_pdsch_cfg_nr_t* pdsch_cfg, SRSLTE_API int srslte_ra_nr_fill_tb(const srslte_sch_cfg_nr_t* pdsch_cfg,
const srslte_pdsch_grant_nr_t* grant, const srslte_sch_grant_nr_t* grant,
uint32_t mcs_idx, uint32_t mcs_idx,
srslte_sch_tb_t* tb); srslte_sch_tb_t* tb);
/**
#ifdef __cplusplus * @brief Converts an unpacked DL DCI message to a PDSCH grant structure.
} * Implements the procedures defined in Section 5 of 38.214 to compute the resource allocation (5.1.2)
#endif * and modulation order, target rate, redundancy version and TBS (5.1.3)
*
* Note: Only TypeA PDSCH mapping type is supported
*
* @param carrier Carrier information struct
* @param pdsch_cfg PDSCH configuration indicated by higher layers
* @param dci_dl DCI downlink (format 1_0 or 1_1)
* @param pdsch_grant Generated PDSCH grant
* @return 0 on success, -1 on error
*/
SRSLTE_API int srslte_ra_dl_dci_to_grant_nr(const srslte_carrier_nr_t* carrier,
const srslte_sch_cfg_nr_t* pdsch_cfg,
const srslte_dci_dl_nr_t* dci_dl,
srslte_sch_grant_nr_t* pdsch_grant);
#endif // SRSLTE_RA_NR_H #endif // SRSLTE_RA_NR_H

@ -0,0 +1,28 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#ifndef SRSLTE_RA_UL_NR_H
#define SRSLTE_RA_UL_NR_H
#include "srslte/config.h"
#include "srslte/phy/phch/pucch_cfg_nr.h"
#include "uci_cfg_nr.h"
/**
* @brief Calculates the minimum number of PRB required for transmitting NR-PUCCH Format 2, 3 or 4
* @remark Based in TS 38.213 9.2.5.1 UE procedure for multiplexing HARQ-ACK or CSI and SR in a PUCCH
* @return The number of PRB if the provided configuration is valid, SRSLTE_ERROR code otherwise
*/
SRSLTE_API int srslte_ra_ul_nr_pucch_format_2_3_min_prb(const srslte_pucch_nr_resource_t* resource,
const srslte_uci_cfg_nr_t* uci_cfg);
#endif // SRSLTE_RA_UL_NR_H

@ -36,7 +36,7 @@
#include "srslte/phy/fec/ldpc/ldpc_decoder.h" #include "srslte/phy/fec/ldpc/ldpc_decoder.h"
#include "srslte/phy/fec/ldpc/ldpc_encoder.h" #include "srslte/phy/fec/ldpc/ldpc_encoder.h"
#include "srslte/phy/fec/ldpc/ldpc_rm.h" #include "srslte/phy/fec/ldpc/ldpc_rm.h"
#include "srslte/phy/phch/pdsch_cfg_nr.h" #include "srslte/phy/phch/phch_cfg_nr.h"
#define SRSLTE_SCH_NR_MAX_NOF_CB_LDPC \ #define SRSLTE_SCH_NR_MAX_NOF_CB_LDPC \
((SRSLTE_SLOT_MAX_NOF_BITS_NR + (SRSLTE_LDPC_BG2_MAX_LEN_CB - 1)) / SRSLTE_LDPC_BG2_MAX_LEN_CB) ((SRSLTE_SLOT_MAX_NOF_BITS_NR + (SRSLTE_LDPC_BG2_MAX_LEN_CB - 1)) / SRSLTE_LDPC_BG2_MAX_LEN_CB)
@ -119,17 +119,39 @@ SRSLTE_API srslte_basegraph_t srslte_sch_nr_select_basegraph(uint32_t tbs, doubl
* @param cfg SCH object * @param cfg SCH object
* @return * @return
*/ */
SRSLTE_API int srslte_dlsch_nr_fill_cfg(srslte_sch_nr_t* q, SRSLTE_API int srslte_sch_nr_fill_cfg(srslte_sch_nr_t* q,
const srslte_sch_cfg_t* sch_cfg, const srslte_sch_cfg_t* sch_cfg,
const srslte_sch_tb_t* tb, const srslte_sch_tb_t* tb,
srslte_sch_nr_common_cfg_t* cfg); srslte_sch_nr_common_cfg_t* cfg);
SRSLTE_API int srslte_sch_nr_init_tx(srslte_sch_nr_t* q, const srslte_sch_nr_args_t* cfg); /**
* @brief Initialises an SCH object as transmitter
* @param q Points ats the SCH object
* @param args Provides static configuration arguments
* @return SRSLTE_SUCCESS if the initialization is successful, SRSLTE_ERROR otherwise
*/
SRSLTE_API int srslte_sch_nr_init_tx(srslte_sch_nr_t* q, const srslte_sch_nr_args_t* args);
SRSLTE_API int srslte_sch_nr_init_rx(srslte_sch_nr_t* q, const srslte_sch_nr_args_t* cfg); /**
* @brief Initialises an SCH object as receiver
* @param q Points ats the SCH object
* @param args Provides static configuration arguments
* @return SRSLTE_SUCCESS if the initialization is successful, SRSLTE_ERROR otherwise
*/
SRSLTE_API int srslte_sch_nr_init_rx(srslte_sch_nr_t* q, const srslte_sch_nr_args_t* args);
/**
* @brief Sets SCH object carrier attribute
* @param q Points ats the SCH object
* @param carrier Provides the NR carrier object
* @return SRSLTE_SUCCESS if the setting is successful, SRSLTE_ERROR otherwise
*/
SRSLTE_API int srslte_sch_nr_set_carrier(srslte_sch_nr_t* q, const srslte_carrier_nr_t* carrier); SRSLTE_API int srslte_sch_nr_set_carrier(srslte_sch_nr_t* q, const srslte_carrier_nr_t* carrier);
/**
* @brief Free allocated resources used by an SCH intance
* @param q Points ats the SCH object
*/
SRSLTE_API void srslte_sch_nr_free(srslte_sch_nr_t* q); SRSLTE_API void srslte_sch_nr_free(srslte_sch_nr_t* q);
SRSLTE_API int srslte_dlsch_nr_encode(srslte_sch_nr_t* q, SRSLTE_API int srslte_dlsch_nr_encode(srslte_sch_nr_t* q,
@ -138,8 +160,6 @@ SRSLTE_API int srslte_dlsch_nr_encode(srslte_sch_nr_t* q,
const uint8_t* data, const uint8_t* data,
uint8_t* e_bits); uint8_t* e_bits);
SRSLTE_API int srslte_sch_nr_decoder_set_carrier(srslte_sch_nr_t* q, const srslte_carrier_nr_t* carrier);
SRSLTE_API int srslte_dlsch_nr_decode(srslte_sch_nr_t* q, SRSLTE_API int srslte_dlsch_nr_decode(srslte_sch_nr_t* q,
const srslte_sch_cfg_t* sch_cfg, const srslte_sch_cfg_t* sch_cfg,
const srslte_sch_tb_t* tb, const srslte_sch_tb_t* tb,
@ -147,6 +167,19 @@ SRSLTE_API int srslte_dlsch_nr_decode(srslte_sch_nr_t* q,
uint8_t* data, uint8_t* data,
bool* crc_ok); bool* crc_ok);
SRSLTE_API int srslte_ulsch_nr_encode(srslte_sch_nr_t* q,
const srslte_sch_cfg_t* cfg,
const srslte_sch_tb_t* tb,
const uint8_t* data,
uint8_t* e_bits);
SRSLTE_API int srslte_ulsch_nr_decode(srslte_sch_nr_t* q,
const srslte_sch_cfg_t* sch_cfg,
const srslte_sch_tb_t* tb,
int8_t* e_bits,
uint8_t* data,
bool* crc_ok);
SRSLTE_API int srslte_sch_nr_tb_info(const srslte_sch_tb_t* tb, char* str, uint32_t str_len); SRSLTE_API int srslte_sch_nr_tb_info(const srslte_sch_tb_t* tb, char* str, uint32_t str_len);
#endif // SRSLTE_SCH_NR_H #endif // SRSLTE_SCH_NR_H

@ -41,7 +41,6 @@
#define SRSLTE_UCI_MAX_CQI_LEN_PUCCH 13 #define SRSLTE_UCI_MAX_CQI_LEN_PUCCH 13
#define SRSLTE_UCI_CQI_CODED_PUCCH_B 20 #define SRSLTE_UCI_CQI_CODED_PUCCH_B 20
#define SRSLTE_UCI_STR_MAX_CHAR 32 #define SRSLTE_UCI_STR_MAX_CHAR 32
#define SRSLTE_UCI_M_BASIS_SEQ_LEN 32
typedef struct SRSLTE_API { typedef struct SRSLTE_API {
srslte_crc_t crc; srslte_crc_t crc;
@ -49,8 +48,6 @@ typedef struct SRSLTE_API {
uint8_t tmp_cqi[SRSLTE_UCI_MAX_CQI_LEN_PUSCH]; uint8_t tmp_cqi[SRSLTE_UCI_MAX_CQI_LEN_PUSCH];
uint8_t encoded_cqi[3 * SRSLTE_UCI_MAX_CQI_LEN_PUSCH]; uint8_t encoded_cqi[3 * SRSLTE_UCI_MAX_CQI_LEN_PUSCH];
int16_t encoded_cqi_s[3 * SRSLTE_UCI_MAX_CQI_LEN_PUSCH]; int16_t encoded_cqi_s[3 * SRSLTE_UCI_MAX_CQI_LEN_PUSCH];
uint8_t* cqi_table[11];
int16_t* cqi_table_s[11];
} srslte_uci_cqi_pusch_t; } srslte_uci_cqi_pusch_t;
typedef struct SRSLTE_API { typedef struct SRSLTE_API {
@ -74,30 +71,6 @@ SRSLTE_API int16_t srslte_uci_decode_cqi_pucch(srslte_uci_cqi_pucch_t* q,
int16_t b_bits[SRSLTE_CQI_MAX_BITS], // aligned for simd int16_t b_bits[SRSLTE_CQI_MAX_BITS], // aligned for simd
uint8_t* cqi_data, uint8_t* cqi_data,
uint32_t cqi_len); uint32_t cqi_len);
/**
* Encodes Uplink Control Information using M-basis code block channel coding.
*
* @param input points to the bit to encode, one word per bit
* @param input_len number of bits to encode, the maximum number of bits is 11
* @param output points to the encoded data, one word per bit
* @param output_len number of bits of encoded bits
*/
SRSLTE_API void
srslte_uci_encode_m_basis_bits(const uint8_t* input, uint32_t input_len, uint8_t* output, uint32_t output_len);
/**
* Decodes Uplink Control Information using M-basis code block channel coding.
*
* @param llr points soft-bits
* @param nof_llr number of soft-bits, requires a minimum of 32 soft-bits
* @param data points to receice data, one word per bit
* @param data_len number of bits to decode, the maximum number of bits is 11
* @return maximum correlation value
*/
SRSLTE_API int32_t srslte_uci_decode_m_basis_bits(const int16_t* llr,
uint32_t nof_llr,
uint8_t* data,
uint32_t data_len);
SRSLTE_API int srslte_uci_cqi_init(srslte_uci_cqi_pusch_t* q); SRSLTE_API int srslte_uci_cqi_init(srslte_uci_cqi_pusch_t* q);

@ -0,0 +1,65 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#ifndef SRSLTE_UCI_CFG_NR_H
#define SRSLTE_UCI_CFG_NR_H
#include "srslte/phy/common/phy_common.h"
#include <stdbool.h>
#include <stdint.h>
/**
* @brief Maximum number of HARQ ACK feedback bits that can be carried in Uplink Control Information (UCI) message
*/
#define SRSLTE_UCI_NR_MAX_ACK_BITS 360
/**
* @brief Maximum number of Scheduling Request (SR) bits that can be carried in Uplink Control Information (UCI) message
*/
#define SRSLTE_UCI_NR_MAX_SR_BITS 10
/**
* @brief Maximum number of Channel State Information part 1 (CSI1) bits that can be carried in Uplink Control
* Information (UCI) message
*/
#define SRSLTE_UCI_NR_MAX_CSI1_BITS 10
/**
* @brief Maximum number of Channel State Information part 2 (CSI2) bits that can be carried in Uplink Control
* Information (UCI) message
*/
#define SRSLTE_UCI_NR_MAX_CSI2_BITS 10
/**
* @brief Uplink Control Information (UCI) message configuration
*/
typedef struct SRSLTE_API {
uint32_t o_ack; ///< Number of HARQ-ACK bits
uint32_t o_sr; ///< Number of SR bits
uint32_t o_csi1; ///< Number of CSI1 report number of bits
uint32_t o_csi2; ///< Number of CSI2 report number of bits
srslte_mod_t modulation; ///< Modulation (PUSCH only)
uint16_t rnti; ///< RNTI
} srslte_uci_cfg_nr_t;
/**
* @brief Uplink Control Information (UCI) message packed information
*/
typedef struct SRSLTE_API {
uint8_t ack[SRSLTE_UCI_NR_MAX_ACK_BITS]; ///< HARQ ACK feedback bits
uint8_t sr[SRSLTE_UCI_NR_MAX_SR_BITS]; ///< Scheduling Request bits
uint8_t csi1[SRSLTE_UCI_NR_MAX_CSI1_BITS]; ///< Channel State Information part 1
uint8_t csi2[SRSLTE_UCI_NR_MAX_CSI2_BITS]; ///< Channel State Information part 2
bool valid; ///< Indicates whether the message has been decoded successfully, ignored in the transmitter
} srslte_uci_value_nr_t;
#endif // SRSLTE_UCI_CFG_NR_H

@ -0,0 +1,117 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#ifndef SRSLTE_UCI_NR_H
#define SRSLTE_UCI_NR_H
#include "srslte/phy/fec/crc.h"
#include "srslte/phy/fec/polar/polar_code.h"
#include "srslte/phy/fec/polar/polar_decoder.h"
#include "srslte/phy/fec/polar/polar_encoder.h"
#include "srslte/phy/fec/polar/polar_rm.h"
#include "srslte/phy/phch/pucch_cfg_nr.h"
#include "uci_cfg.h"
#include "uci_cfg_nr.h"
#include <stdbool.h>
#include <stdint.h>
/**
* @brief NR-UCI Encoder/decoder initialization arguments
*/
typedef struct {
bool disable_simd; ///< Disable Polar code SIMD
float block_code_threshold; ///< Set normalised block code threshold (receiver only)
} srslte_uci_nr_args_t;
typedef struct {
srslte_polar_rm_t rm_tx;
srslte_polar_rm_t rm_rx;
srslte_polar_encoder_t encoder;
srslte_polar_decoder_t decoder;
srslte_crc_t crc6;
srslte_crc_t crc11;
srslte_polar_code_t code;
uint8_t* bit_sequence; ///< UCI bit sequence
uint8_t* c; ///< UCI code-block prior encoding or after decoding
uint8_t* allocated; ///< Polar code intermediate
uint8_t* d; ///< Polar code encoded intermediate
float block_code_threshold;
} srslte_uci_nr_t;
/**
* @brief Calculates the number of bits carried by PUCCH formats 2, 3 and 4 from the PUCCH resource
* @remark Defined in TS 38.212 Table 6.3.1.4-1: Total rate matching output sequence length Etot
* @param resource PUCCH format 2, 3 or 4 Resource provided by upper layers
* @return The number of bits if the provided resource is valid, SRSLTE_ERROR code otherwise
*/
SRSLTE_API int srslte_uci_nr_pucch_format_2_3_4_E(const srslte_pucch_nr_resource_t* resource);
/**
* @brief Calculates in advance how many CRC bits will be appended for a given amount of UCI bits (A)
* @remark Defined in TS 38.212 section 6.3.1.2 Code block segmentation and CRC attachment
* @param A Number of UCI bits to transmit
*/
SRSLTE_API uint32_t srslte_uci_nr_crc_len(uint32_t A);
/**
* @brief Initialises NR-UCI encoder/decoder object
* @param[in,out] q NR-UCI object
* @param[in] args Configuration arguments
* @return SRSLTE_SUCCESS if initialization is successful, SRSLTE_ERROR code otherwise
*/
SRSLTE_API int srslte_uci_nr_init(srslte_uci_nr_t* q, const srslte_uci_nr_args_t* args);
/**
* @brief Deallocates NR-UCI encoder/decoder object
* @param[in,out] q NR-UCI object
*/
SRSLTE_API void srslte_uci_nr_free(srslte_uci_nr_t* q);
/**
* @brief Encodes UCI bits
*
* @attention Compatible only with PUCCH formats 2, 3 and 4
*
* @remark Defined in TS 38.212 section 6.3.1.1
*
* @param[in,out] q NR-UCI object
* @param[in] pucch_cfg Higher layers PUCCH configuration
* @param[in] uci_cfg UCI configuration
* @param[in] uci_value UCI values
* @param[out] o Output encoded bits
* @return Number of encoded bits if encoding is successful, SRSLTE_ERROR code otherwise
*/
SRSLTE_API int srslte_uci_nr_encode_pucch(srslte_uci_nr_t* q,
const srslte_pucch_nr_resource_t* pucch_resource,
const srslte_uci_cfg_nr_t* uci_cfg,
const srslte_uci_value_nr_t* value,
uint8_t* o);
/**
* @brief Decoder UCI bits
*
* @attention Compatible only with PUCCH formats 2, 3 and 4
*
* @param[in,out] q NR-UCI object
* @param[in] pucch_resource_cfg
* @param[in] uci_cfg
* @param[in] llr
* @param[out] value
* @return SRSLTE_SUCCESSFUL if it is successful, SRSLTE_ERROR code otherwise
*/
SRSLTE_API int srslte_uci_nr_decode_pucch(srslte_uci_nr_t* q,
const srslte_pucch_nr_resource_t* pucch_resource_cfg,
const srslte_uci_cfg_nr_t* uci_cfg,
int8_t* llr,
srslte_uci_value_nr_t* value);
#endif // SRSLTE_UCI_NR_H

@ -29,10 +29,6 @@
#include "srslte/phy/phch/pdcch_nr.h" #include "srslte/phy/phch/pdcch_nr.h"
#include "srslte/phy/phch/pdsch_nr.h" #include "srslte/phy/phch/pdsch_nr.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct SRSLTE_API { typedef struct SRSLTE_API {
srslte_pdsch_nr_args_t pdsch; srslte_pdsch_nr_args_t pdsch;
srslte_pdcch_nr_args_t pdcch; srslte_pdcch_nr_args_t pdcch;
@ -55,7 +51,7 @@ typedef struct SRSLTE_API {
cf_t* sf_symbols[SRSLTE_MAX_PORTS]; cf_t* sf_symbols[SRSLTE_MAX_PORTS];
srslte_chest_dl_res_t chest; srslte_chest_dl_res_t chest;
srslte_pdsch_nr_t pdsch; srslte_pdsch_nr_t pdsch;
srslte_dmrs_pdsch_t dmrs_pdsch; srslte_dmrs_sch_t dmrs_pdsch;
srslte_dmrs_pdcch_estimator_t dmrs_pdcch; srslte_dmrs_pdcch_estimator_t dmrs_pdcch;
srslte_pdcch_nr_t pdcch; srslte_pdcch_nr_t pdcch;
@ -80,21 +76,16 @@ SRSLTE_API int srslte_ue_dl_nr_find_dl_dci(srslte_ue_dl_nr_t* q,
srslte_dci_dl_nr_t* dci_dl_list, srslte_dci_dl_nr_t* dci_dl_list,
uint32_t nof_dci_msg); uint32_t nof_dci_msg);
SRSLTE_API int srslte_ue_dl_nr_pdsch_get(srslte_ue_dl_nr_t* q, SRSLTE_API int srslte_ue_dl_nr_decode_pdsch(srslte_ue_dl_nr_t* q,
const srslte_dl_slot_cfg_t* slot, const srslte_dl_slot_cfg_t* slot,
const srslte_pdsch_cfg_nr_t* cfg, const srslte_sch_cfg_nr_t* cfg,
const srslte_pdsch_grant_nr_t* grant,
srslte_pdsch_res_nr_t* res); srslte_pdsch_res_nr_t* res);
SRSLTE_API int srslte_ue_dl_nr_pdsch_info(const srslte_ue_dl_nr_t* q, SRSLTE_API int srslte_ue_dl_nr_pdsch_info(const srslte_ue_dl_nr_t* q,
const srslte_pdsch_cfg_nr_t* cfg, const srslte_sch_cfg_nr_t* cfg,
const srslte_pdsch_grant_nr_t* grant,
const srslte_pdsch_res_nr_t res[SRSLTE_MAX_CODEWORDS], const srslte_pdsch_res_nr_t res[SRSLTE_MAX_CODEWORDS],
char* str, char* str,
uint32_t str_len); uint32_t str_len);
#ifdef __cplusplus
}
#endif
#endif // SRSLTE_UE_DL_NR_H #endif // SRSLTE_UE_DL_NR_H

@ -1,75 +0,0 @@
/**
* Copyright 2013-2020 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/.
*
*/
/******************************************************************************
* @file ue_dl_nr.h
*
* Description: NR UE downlink physical layer procedures for data
*
* This module is a frontend to all the downlink data channel processing modules.
*
* Reference:
*****************************************************************************/
#ifndef SRSLTE_UE_DL_NR_DATA_H
#define SRSLTE_UE_DL_NR_DATA_H
#include "srslte/phy/common/phy_common_nr.h"
#include "srslte/phy/phch/pdsch_cfg_nr.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Calculates the PDSCH time resource provided by higher layers and stores it in the provided PDSCH NR grant.
*
* @remark Defined by TS 38.214 V15.10.0 section 5.1.2.1.1 Determination of the resource allocation table to be used for
* PDSCH
*
* @param pdsch_alloc Flattened PHY PDSCH allocation configuration provided from higher layers
* @param[out] grant PDSCH mapping type
* @return Returns SRSLTE_SUCCESS if the provided allocation is valid, otherwise it returns SRSLTE_ERROR code
*/
SRSLTE_API int srslte_ue_dl_nr_pdsch_time_resource_hl(const srslte_pdsch_allocation_t* pdsch_alloc,
srslte_pdsch_grant_nr_t* grant);
/**
* @brief Calculates the PDSCH time resource default A and stores it in the provided PDSCH NR grant. This can be used by
* SI-RNTI, RA-RNTI, P-RNTI and C-RNTI. See Table 5.1.2.1.1-1 for more details about the usage.
*
* @remark Defined by TS 38.214 V15.10.0 Table 5.1.2.1.1-2: Default PDSCH time domain resource allocation A for normal
* CP
*
* @param m Time domain resource assignment field value m of the DCI
* @param dmrs_typeA_pos DMRS TypeA position provided by higher layers
* @param[out] grant PDSCH mapping type
* @return Returns SRSLTE_SUCCESS if the provided allocation is valid, otherwise it returns SRSLTE_ERROR code
*/
SRSLTE_API int srslte_ue_dl_nr_pdsch_time_resource_default_A(uint32_t m,
srslte_dmrs_pdsch_typeA_pos_t dmrs_typeA_pos,
srslte_pdsch_grant_nr_t* grant);
#ifdef __cplusplus
}
#endif
#endif // SRSLTE_UE_DL_NR_DATA_H

@ -0,0 +1,54 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
/******************************************************************************
* @file ue_dl_nr.h
*
* Description: NR UE uplink physical layer procedures for data
*
* This module is a frontend to all the uplink data channel processing modules.
*
* Reference:
*****************************************************************************/
#ifndef SRSLTE_UE_UL_DATA_H
#define SRSLTE_UE_UL_DATA_H
#include "srslte/phy/common/phy_common_nr.h"
#include "srslte/phy/phch/phch_cfg_nr.h"
/**
* @brief Calculates the PUSCH time resource default A and stores it in the provided PUSCH NR grant.
*
* @remark Defined by TS 38.214 V15.10.0 Table 6.1.2.1.1-2: Default PUSCH time domain resource allocation A for normal
* CP
*
* @param m Time domain resource assignment field value m of the DCI
* @param[out] grant PUSCH grant
* @return Returns SRSLTE_SUCCESS if the provided allocation is valid, otherwise it returns SRSLTE_ERROR code
*/
SRSLTE_API int srslte_ue_ul_nr_pdsch_time_resource_default_A(uint32_t m, srslte_sch_grant_nr_t* grant);
/**
* @brief Calculates the number of PUSCH-DMRS CDM groups without data for DCI format 0_0
*
* @remark Defined by TS 38.214 V15.10.0 6.2.2 UE DM-RS transmission procedure
*
* @param cfg PUSCH NR configuration by upper layers
* @param[out] grant Provides grant pointer to fill
* @return Returns SRSLTE_SUCCESS if the provided data is valid, otherwise it returns SRSLTE_ERROR code
*/
SRSLTE_API int srslte_ue_ul_nr_nof_dmrs_cdm_groups_without_data_format_0_0(const srslte_sch_cfg_nr_t* cfg,
srslte_sch_grant_nr_t* grant);
#endif // SRSLTE_UE_UL_DATA_H

@ -0,0 +1,34 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#ifndef SRSLTE_PRIMES_H
#define SRSLTE_PRIMES_H
#include "srslte/config.h"
#include <stdint.h>
/**
* @brief Finds the smallest prime number greater than n
* @param[in] n Provide the number
* @return A prime number below 1193, SRSLTE_ERROR code otherwise
*/
SRSLTE_API int srslte_prime_greater_than(uint32_t n);
/**
* @brief Finds the biggest prime number lesser than n
* @attention the maximum prime number it can return is 1193
* @param[in] n Provide the number
* @return A prime number below 1193, SRSLTE_ERROR code otherwise
*/
SRSLTE_API int srslte_prime_lower_than(uint32_t n);
#endif // SRSLTE_PRIMES_H

@ -116,6 +116,9 @@ SRSLTE_API void srslte_vec_u32_zero(uint32_t* ptr, uint32_t nsamples);
SRSLTE_API void srslte_vec_cf_copy(cf_t* dst, const cf_t* src, uint32_t len); SRSLTE_API void srslte_vec_cf_copy(cf_t* dst, const cf_t* src, uint32_t len);
SRSLTE_API void srslte_vec_f_copy(float* dst, const float* src, uint32_t len); SRSLTE_API void srslte_vec_f_copy(float* dst, const float* src, uint32_t len);
SRSLTE_API void srslte_vec_u8_copy(uint8_t* dst, const uint8_t* src, uint32_t len); SRSLTE_API void srslte_vec_u8_copy(uint8_t* dst, const uint8_t* src, uint32_t len);
SRSLTE_API void srslte_vec_i8_copy(int8_t* dst, const int8_t* src, uint32_t len);
SRSLTE_API void srslte_vec_u16_copy(uint16_t* dst, const uint16_t* src, uint32_t len);
SRSLTE_API void srslte_vec_i16_copy(int16_t* dst, const int16_t* src, uint32_t len);
/* print vectors */ /* print vectors */
SRSLTE_API void srslte_vec_fprint_c(FILE* stream, const cf_t* x, const uint32_t len); SRSLTE_API void srslte_vec_fprint_c(FILE* stream, const cf_t* x, const uint32_t len);
@ -145,6 +148,7 @@ SRSLTE_API void srslte_vec_sub_bbb(const int8_t* x, const int8_t* y, int8_t* z,
/* scalar product */ /* scalar product */
SRSLTE_API void srslte_vec_sc_prod_cfc(const cf_t* x, const float h, cf_t* z, const uint32_t len); SRSLTE_API void srslte_vec_sc_prod_cfc(const cf_t* x, const float h, cf_t* z, const uint32_t len);
SRSLTE_API void srslte_vec_sc_prod_fcc(const float* x, const cf_t h, cf_t* z, const uint32_t len);
SRSLTE_API void srslte_vec_sc_prod_ccc(const cf_t* x, const cf_t h, cf_t* z, const uint32_t len); SRSLTE_API void srslte_vec_sc_prod_ccc(const cf_t* x, const cf_t h, cf_t* z, const uint32_t len);
SRSLTE_API void srslte_vec_sc_prod_fff(const float* x, const float h, float* z, const uint32_t len); SRSLTE_API void srslte_vec_sc_prod_fff(const float* x, const float h, float* z, const uint32_t len);
@ -199,6 +203,7 @@ SRSLTE_API void srslte_vec_conj_cc(const cf_t* x, cf_t* y, const uint32_t len);
/* average vector power */ /* average vector power */
SRSLTE_API float srslte_vec_avg_power_cf(const cf_t* x, const uint32_t len); SRSLTE_API float srslte_vec_avg_power_cf(const cf_t* x, const uint32_t len);
SRSLTE_API float srslte_vec_avg_power_sf(const int16_t* x, const uint32_t len); SRSLTE_API float srslte_vec_avg_power_sf(const int16_t* x, const uint32_t len);
SRSLTE_API float srslte_vec_avg_power_bf(const int8_t* x, const uint32_t len);
/* Correlation between complex vectors x and y */ /* Correlation between complex vectors x and y */
SRSLTE_API float srslte_vec_corr_ccc(const cf_t* x, cf_t* y, const uint32_t len); SRSLTE_API float srslte_vec_corr_ccc(const cf_t* x, cf_t* y, const uint32_t len);

@ -51,6 +51,8 @@ SRSLTE_API void srslte_vec_sub_fff_simd(const float* x, const float* y, float* z
/* SIMD Vector Scalar Product */ /* SIMD Vector Scalar Product */
SRSLTE_API void srslte_vec_sc_prod_cfc_simd(const cf_t* x, const float h, cf_t* y, const int len); SRSLTE_API void srslte_vec_sc_prod_cfc_simd(const cf_t* x, const float h, cf_t* y, const int len);
SRSLTE_API void srslte_vec_sc_prod_fcc_simd(const float* x, const cf_t h, cf_t* y, const int len);
SRSLTE_API void srslte_vec_sc_prod_fff_simd(const float* x, const float h, float* z, const int len); SRSLTE_API void srslte_vec_sc_prod_fff_simd(const float* x, const float h, float* z, const int len);
SRSLTE_API void srslte_vec_sc_prod_ccc_simd(const cf_t* x, const cf_t h, cf_t* z, const int len); SRSLTE_API void srslte_vec_sc_prod_ccc_simd(const cf_t* x, const cf_t h, cf_t* z, const int len);

@ -48,6 +48,8 @@ extern "C" {
#include "srslte/phy/ch_estimation/chest_dl.h" #include "srslte/phy/ch_estimation/chest_dl.h"
#include "srslte/phy/ch_estimation/chest_ul.h" #include "srslte/phy/ch_estimation/chest_ul.h"
#include "srslte/phy/ch_estimation/dmrs_pdcch.h"
#include "srslte/phy/ch_estimation/dmrs_sch.h"
#include "srslte/phy/ch_estimation/refsignal_dl.h" #include "srslte/phy/ch_estimation/refsignal_dl.h"
#include "srslte/phy/ch_estimation/refsignal_ul.h" #include "srslte/phy/ch_estimation/refsignal_ul.h"
#include "srslte/phy/ch_estimation/wiener_dl.h" #include "srslte/phy/ch_estimation/wiener_dl.h"
@ -79,6 +81,7 @@ extern "C" {
#include "srslte/phy/modem/demod_hard.h" #include "srslte/phy/modem/demod_hard.h"
#include "srslte/phy/modem/demod_soft.h" #include "srslte/phy/modem/demod_soft.h"
#include "srslte/phy/modem/evm.h"
#include "srslte/phy/modem/mod.h" #include "srslte/phy/modem/mod.h"
#include "srslte/phy/modem/modem_table.h" #include "srslte/phy/modem/modem_table.h"
@ -88,9 +91,11 @@ extern "C" {
#include "srslte/phy/fec/softbuffer.h" #include "srslte/phy/fec/softbuffer.h"
#include "srslte/phy/phch/cqi.h" #include "srslte/phy/phch/cqi.h"
#include "srslte/phy/phch/dci.h" #include "srslte/phy/phch/dci.h"
#include "srslte/phy/phch/dci_nr.h"
#include "srslte/phy/phch/pbch.h" #include "srslte/phy/phch/pbch.h"
#include "srslte/phy/phch/pcfich.h" #include "srslte/phy/phch/pcfich.h"
#include "srslte/phy/phch/pdcch.h" #include "srslte/phy/phch/pdcch.h"
#include "srslte/phy/phch/pdcch_nr.h"
#include "srslte/phy/phch/pdsch.h" #include "srslte/phy/phch/pdsch.h"
#include "srslte/phy/phch/phich.h" #include "srslte/phy/phch/phich.h"
#include "srslte/phy/phch/prach.h" #include "srslte/phy/phch/prach.h"
@ -99,6 +104,8 @@ extern "C" {
#include "srslte/phy/phch/pusch.h" #include "srslte/phy/phch/pusch.h"
#include "srslte/phy/phch/ra.h" #include "srslte/phy/phch/ra.h"
#include "srslte/phy/phch/ra_dl.h" #include "srslte/phy/phch/ra_dl.h"
#include "srslte/phy/phch/ra_dl_nr.h"
#include "srslte/phy/phch/ra_nr.h"
#include "srslte/phy/phch/ra_ul.h" #include "srslte/phy/phch/ra_ul.h"
#include "srslte/phy/phch/regs.h" #include "srslte/phy/phch/regs.h"
#include "srslte/phy/phch/sch.h" #include "srslte/phy/phch/sch.h"
@ -106,11 +113,13 @@ extern "C" {
#include "srslte/phy/ue/ue_cell_search.h" #include "srslte/phy/ue/ue_cell_search.h"
#include "srslte/phy/ue/ue_dl.h" #include "srslte/phy/ue/ue_dl.h"
#include "srslte/phy/ue/ue_dl_nr.h"
#include "srslte/phy/ue/ue_mib.h" #include "srslte/phy/ue/ue_mib.h"
#include "srslte/phy/ue/ue_sync.h" #include "srslte/phy/ue/ue_sync.h"
#include "srslte/phy/ue/ue_ul.h" #include "srslte/phy/ue/ue_ul.h"
#include "srslte/phy/enb/enb_dl.h" #include "srslte/phy/enb/enb_dl.h"
#include "srslte/phy/enb/enb_dl_nr.h"
#include "srslte/phy/enb/enb_ul.h" #include "srslte/phy/enb/enb_ul.h"
#include "srslte/phy/scrambling/scrambling.h" #include "srslte/phy/scrambling/scrambling.h"

@ -22,6 +22,8 @@
#ifndef SRSLTE_IPV6_H #ifndef SRSLTE_IPV6_H
#define SRSLTE_IPV6_H #define SRSLTE_IPV6_H
#include <linux/in6.h>
// as of glibc 2.19, the IPv6 issue seems to be fixed https://sourceware.org/bugzilla/show_bug.cgi?id=15850 // as of glibc 2.19, the IPv6 issue seems to be fixed https://sourceware.org/bugzilla/show_bug.cgi?id=15850
#if __GLIBC_PREREQ(2, 19) #if __GLIBC_PREREQ(2, 19)
#include <linux/ipv6.h> #include <linux/ipv6.h>

@ -135,7 +135,7 @@ private:
bool retx_queue_has_sn(uint32_t sn); bool retx_queue_has_sn(uint32_t sn);
int required_buffer_size(rlc_amd_retx_t retx); int required_buffer_size(rlc_amd_retx_t retx);
void retransmit_random_pdu(); void retransmit_pdu();
// Helpers // Helpers
bool poll_required(); bool poll_required();

@ -2631,14 +2631,8 @@ LIBLTE_ERROR_ENUM liblte_mme_pack_ue_network_capability_ie(LIBLTE_MME_UE_NETWORK
LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS;
if (ue_network_cap != NULL && ie_ptr != NULL) { if (ue_network_cap != NULL && ie_ptr != NULL) {
if (ue_network_cap->uea_present && (ue_network_cap->ucs2_present || ue_network_cap->uia_present) && if (ue_network_cap->dc_nr_present) {
(ue_network_cap->lpp_present || ue_network_cap->lcs_present || ue_network_cap->onexsrvcc_present || **ie_ptr = 7;
ue_network_cap->nf_present)) {
**ie_ptr = 5;
} else if (ue_network_cap->uea_present && (ue_network_cap->ucs2_present || ue_network_cap->uia_present)) {
**ie_ptr = 4;
} else if (ue_network_cap->uea_present) {
**ie_ptr = 3;
} else { } else {
**ie_ptr = 2; **ie_ptr = 2;
} }
@ -2661,34 +2655,16 @@ LIBLTE_ERROR_ENUM liblte_mme_pack_ue_network_capability_ie(LIBLTE_MME_UE_NETWORK
**ie_ptr |= ue_network_cap->eia[6] << 1; **ie_ptr |= ue_network_cap->eia[6] << 1;
**ie_ptr |= ue_network_cap->eia[7]; **ie_ptr |= ue_network_cap->eia[7];
*ie_ptr += 1; *ie_ptr += 1;
if (ue_network_cap->uea_present) {
**ie_ptr = ue_network_cap->uea[0] << 7; if (ue_network_cap->dc_nr_present) {
**ie_ptr |= ue_network_cap->uea[1] << 6; // skip empty caps
**ie_ptr |= ue_network_cap->uea[2] << 5; for (int i = 0; i < 4; i++) {
**ie_ptr |= ue_network_cap->uea[3] << 4; **ie_ptr = 0;
**ie_ptr |= ue_network_cap->uea[4] << 3;
**ie_ptr |= ue_network_cap->uea[5] << 2;
**ie_ptr |= ue_network_cap->uea[6] << 1;
**ie_ptr |= ue_network_cap->uea[7];
*ie_ptr += 1;
}
if (ue_network_cap->ucs2_present || ue_network_cap->uia_present) {
**ie_ptr = ue_network_cap->ucs2 << 7;
**ie_ptr |= ue_network_cap->uia[1] << 6;
**ie_ptr |= ue_network_cap->uia[2] << 5;
**ie_ptr |= ue_network_cap->uia[3] << 4;
**ie_ptr |= ue_network_cap->uia[4] << 3;
**ie_ptr |= ue_network_cap->uia[5] << 2;
**ie_ptr |= ue_network_cap->uia[6] << 1;
**ie_ptr |= ue_network_cap->uia[7];
*ie_ptr += 1; *ie_ptr += 1;
} }
if (ue_network_cap->lpp_present || ue_network_cap->lcs_present || ue_network_cap->onexsrvcc_present ||
ue_network_cap->nf_present) { // set dcnr bit
**ie_ptr = ue_network_cap->lpp << 3; **ie_ptr = ue_network_cap->dc_nr << 4;
**ie_ptr |= ue_network_cap->lcs << 2;
**ie_ptr |= ue_network_cap->onexsrvcc << 1;
**ie_ptr |= ue_network_cap->nf;
*ie_ptr += 1; *ie_ptr += 1;
} }
@ -5086,6 +5062,43 @@ LIBLTE_ERROR_ENUM liblte_mme_pack_attach_request_msg(LIBLTE_MME_ATTACH_REQUEST_M
msg_ptr++; msg_ptr++;
} }
if (attach_req->additional_security_cap_present) {
*msg_ptr = LIBLTE_MME_ADDITIONAL_SECURITY_CAP_IEI;
msg_ptr++;
*msg_ptr = 0x4; // Length
msg_ptr++;
// Pack same capabilities that are used for EUTRA
*msg_ptr = attach_req->ue_network_cap.eea[0] << 7;
*msg_ptr |= attach_req->ue_network_cap.eea[1] << 6;
*msg_ptr |= attach_req->ue_network_cap.eea[2] << 5;
*msg_ptr |= attach_req->ue_network_cap.eea[3] << 4;
*msg_ptr |= attach_req->ue_network_cap.eea[4] << 3;
*msg_ptr |= attach_req->ue_network_cap.eea[5] << 2;
*msg_ptr |= attach_req->ue_network_cap.eea[6] << 1;
*msg_ptr |= attach_req->ue_network_cap.eea[7];
msg_ptr++;
// 0x00 (5G-EA8=0, 5G-EA9=0, 5G-EA10=0, 5G-EA11=0, 5G-EA12=0, 5G-EA13=0, 5G-EA14=0, 5G-EA15=0)
*msg_ptr = 0x00;
msg_ptr++;
// Pack same integrity caps
*msg_ptr = attach_req->ue_network_cap.eia[0] << 7;
*msg_ptr |= attach_req->ue_network_cap.eia[1] << 6;
*msg_ptr |= attach_req->ue_network_cap.eia[2] << 5;
*msg_ptr |= attach_req->ue_network_cap.eia[3] << 4;
*msg_ptr |= attach_req->ue_network_cap.eia[4] << 3;
*msg_ptr |= attach_req->ue_network_cap.eia[5] << 2;
*msg_ptr |= attach_req->ue_network_cap.eia[6] << 1;
*msg_ptr |= attach_req->ue_network_cap.eia[7];
msg_ptr++;
// 0x00 (5G-IA8=0, 5G-IA9=0, 5G-IA10=0, 5G-IA11=0, 5G-IA12=0, 5G-IA13=0, 5G-IA14=0, 5G-IA15=0)
*msg_ptr = 0x00;
msg_ptr++;
}
// Fill in the number of bytes used // Fill in the number of bytes used
msg->N_bytes = msg_ptr - msg->msg; msg->N_bytes = msg_ptr - msg->msg;

@ -468,67 +468,9 @@ uint8_t bcch_dl_sch_msg_type_br_r13_c::types_opts::to_number() const
} }
// BCCH-DL-SCH-MessageType-MBMS-r14 ::= CHOICE // BCCH-DL-SCH-MessageType-MBMS-r14 ::= CHOICE
void bcch_dl_sch_msg_type_mbms_r14_c::destroy_()
{
switch (type_) {
case types::c1:
c.destroy<c1_c_>();
break;
default:
break;
}
}
void bcch_dl_sch_msg_type_mbms_r14_c::set(types::options e) void bcch_dl_sch_msg_type_mbms_r14_c::set(types::options e)
{ {
destroy_();
type_ = e; type_ = e;
switch (type_) {
case types::c1:
c.init<c1_c_>();
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<c1_c_>());
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<c1_c_>());
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 void bcch_dl_sch_msg_type_mbms_r14_c::to_json(json_writer& j) const
{ {
@ -536,7 +478,7 @@ void bcch_dl_sch_msg_type_mbms_r14_c::to_json(json_writer& j) const
switch (type_) { switch (type_) {
case types::c1: case types::c1:
j.write_fieldname("c1"); j.write_fieldname("c1");
c.get<c1_c_>().to_json(j); c.to_json(j);
break; break;
case types::msg_class_ext: case types::msg_class_ext:
break; break;
@ -550,7 +492,7 @@ SRSASN_CODE bcch_dl_sch_msg_type_mbms_r14_c::pack(bit_ref& bref) const
type_.pack(bref); type_.pack(bref);
switch (type_) { switch (type_) {
case types::c1: case types::c1:
HANDLE_CODE(c.get<c1_c_>().pack(bref)); HANDLE_CODE(c.pack(bref));
break; break;
case types::msg_class_ext: case types::msg_class_ext:
break; break;
@ -567,7 +509,7 @@ SRSASN_CODE bcch_dl_sch_msg_type_mbms_r14_c::unpack(cbit_ref& bref)
set(e); set(e);
switch (type_) { switch (type_) {
case types::c1: case types::c1:
HANDLE_CODE(c.get<c1_c_>().unpack(bref)); HANDLE_CODE(c.unpack(bref));
break; break;
case types::msg_class_ext: case types::msg_class_ext:
break; break;
@ -2480,66 +2422,9 @@ std::string mcch_msg_type_c::c1_c_::types_opts::to_string() const
return convert_enum_idx(options, 1, value, "mcch_msg_type_c::c1_c_::types"); return convert_enum_idx(options, 1, value, "mcch_msg_type_c::c1_c_::types");
} }
void mcch_msg_type_c::later_c_::destroy_()
{
switch (type_) {
case types::c2:
c.destroy<c2_c_>();
break;
default:
break;
}
}
void mcch_msg_type_c::later_c_::set(types::options e) void mcch_msg_type_c::later_c_::set(types::options e)
{ {
destroy_();
type_ = e; type_ = e;
switch (type_) {
case types::c2:
c.init<c2_c_>();
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<c2_c_>());
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<c2_c_>());
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 void mcch_msg_type_c::later_c_::to_json(json_writer& j) const
{ {
@ -2547,7 +2432,7 @@ void mcch_msg_type_c::later_c_::to_json(json_writer& j) const
switch (type_) { switch (type_) {
case types::c2: case types::c2:
j.write_fieldname("c2"); j.write_fieldname("c2");
c.get<c2_c_>().to_json(j); c.to_json(j);
break; break;
case types::msg_class_ext: case types::msg_class_ext:
break; break;
@ -2561,7 +2446,7 @@ SRSASN_CODE mcch_msg_type_c::later_c_::pack(bit_ref& bref) const
type_.pack(bref); type_.pack(bref);
switch (type_) { switch (type_) {
case types::c2: case types::c2:
HANDLE_CODE(c.get<c2_c_>().pack(bref)); HANDLE_CODE(c.pack(bref));
break; break;
case types::msg_class_ext: case types::msg_class_ext:
break; break;
@ -2578,7 +2463,7 @@ SRSASN_CODE mcch_msg_type_c::later_c_::unpack(cbit_ref& bref)
set(e); set(e);
switch (type_) { switch (type_) {
case types::c2: case types::c2:
HANDLE_CODE(c.get<c2_c_>().unpack(bref)); HANDLE_CODE(c.unpack(bref));
break; break;
case types::msg_class_ext: case types::msg_class_ext:
break; break;
@ -4277,67 +4162,9 @@ std::string sc_mcch_msg_type_r13_c::c1_c_::types_opts::to_string() const
return convert_enum_idx(options, 1, value, "sc_mcch_msg_type_r13_c::c1_c_::types"); return convert_enum_idx(options, 1, value, "sc_mcch_msg_type_r13_c::c1_c_::types");
} }
void sc_mcch_msg_type_r13_c::msg_class_ext_c_::destroy_()
{
switch (type_) {
case types::c2:
c.destroy<c2_c_>();
break;
default:
break;
}
}
void sc_mcch_msg_type_r13_c::msg_class_ext_c_::set(types::options e) void sc_mcch_msg_type_r13_c::msg_class_ext_c_::set(types::options e)
{ {
destroy_();
type_ = e; type_ = e;
switch (type_) {
case types::c2:
c.init<c2_c_>();
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<c2_c_>());
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<c2_c_>());
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 void sc_mcch_msg_type_r13_c::msg_class_ext_c_::to_json(json_writer& j) const
{ {
@ -4345,7 +4172,7 @@ void sc_mcch_msg_type_r13_c::msg_class_ext_c_::to_json(json_writer& j) const
switch (type_) { switch (type_) {
case types::c2: case types::c2:
j.write_fieldname("c2"); j.write_fieldname("c2");
c.get<c2_c_>().to_json(j); c.to_json(j);
break; break;
case types::msg_class_ext_future_r14: case types::msg_class_ext_future_r14:
break; break;
@ -4359,7 +4186,7 @@ SRSASN_CODE sc_mcch_msg_type_r13_c::msg_class_ext_c_::pack(bit_ref& bref) const
type_.pack(bref); type_.pack(bref);
switch (type_) { switch (type_) {
case types::c2: case types::c2:
HANDLE_CODE(c.get<c2_c_>().pack(bref)); HANDLE_CODE(c.pack(bref));
break; break;
case types::msg_class_ext_future_r14: case types::msg_class_ext_future_r14:
break; break;
@ -4376,7 +4203,7 @@ SRSASN_CODE sc_mcch_msg_type_r13_c::msg_class_ext_c_::unpack(cbit_ref& bref)
set(e); set(e);
switch (type_) { switch (type_) {
case types::c2: case types::c2:
HANDLE_CODE(c.get<c2_c_>().unpack(bref)); HANDLE_CODE(c.unpack(bref));
break; break;
case types::msg_class_ext_future_r14: case types::msg_class_ext_future_r14:
break; break;
@ -4662,40 +4489,6 @@ std::string visited_cell_info_r12_s::visited_cell_id_r12_c_::types_opts::to_stri
return convert_enum_idx(options, 2, value, "visited_cell_info_r12_s::visited_cell_id_r12_c_::types"); return convert_enum_idx(options, 2, value, "visited_cell_info_r12_s::visited_cell_id_r12_c_::types");
} }
// FailureReportSCG-v12d0 ::= SEQUENCE
SRSASN_CODE fail_report_scg_v12d0_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(meas_result_neigh_cells_v12d0_present, 1));
if (meas_result_neigh_cells_v12d0_present) {
HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_v12d0, 1, 8));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE fail_report_scg_v12d0_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(meas_result_neigh_cells_v12d0_present, 1));
if (meas_result_neigh_cells_v12d0_present) {
HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_v12d0, bref, 1, 8));
}
return SRSASN_SUCCESS;
}
void fail_report_scg_v12d0_s::to_json(json_writer& j) const
{
j.start_obj();
if (meas_result_neigh_cells_v12d0_present) {
j.start_array("measResultNeighCells-v12d0");
for (const auto& e1 : meas_result_neigh_cells_v12d0) {
e1.to_json(j);
}
j.end_array();
}
j.end_obj();
}
std::string idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_::types_opts::to_string() const std::string idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_::types_opts::to_string() const
{ {
static const char* options[] = {"subframeConfig0-r11", "subframeConfig1-5-r11", "subframeConfig6-r11"}; static const char* options[] = {"subframeConfig0-r11", "subframeConfig1-5-r11", "subframeConfig6-r11"};
@ -4738,44 +4531,6 @@ uint8_t rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_::types_opts::to_numbe
return map_enum_number(options, 21, value, "rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_::types"); return map_enum_number(options, 21, value, "rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_::types");
} }
// SCGFailureInformation-v12d0b-IEs ::= SEQUENCE
SRSASN_CODE scg_fail_info_v12d0b_ies_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(fail_report_scg_v12d0_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
if (fail_report_scg_v12d0_present) {
HANDLE_CODE(fail_report_scg_v12d0.pack(bref));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE scg_fail_info_v12d0b_ies_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(fail_report_scg_v12d0_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
if (fail_report_scg_v12d0_present) {
HANDLE_CODE(fail_report_scg_v12d0.unpack(bref));
}
return SRSASN_SUCCESS;
}
void scg_fail_info_v12d0b_ies_s::to_json(json_writer& j) const
{
j.start_obj();
if (fail_report_scg_v12d0_present) {
j.write_fieldname("failureReportSCG-v12d0");
fail_report_scg_v12d0.to_json(j);
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
}
j.end_obj();
}
std::string meas_results_s::meas_result_neigh_cells_c_::types_opts::to_string() const std::string meas_results_s::meas_result_neigh_cells_c_::types_opts::to_string() const
{ {
static const char* options[] = {"measResultListEUTRA", static const char* options[] = {"measResultListEUTRA",
@ -5105,6 +4860,40 @@ band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_
options, 3, value, "band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_::types"); options, 3, value, "band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_::types");
} }
// FailureReportSCG-v12d0 ::= SEQUENCE
SRSASN_CODE fail_report_scg_v12d0_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(meas_result_neigh_cells_v12d0_present, 1));
if (meas_result_neigh_cells_v12d0_present) {
HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_v12d0, 1, 8));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE fail_report_scg_v12d0_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(meas_result_neigh_cells_v12d0_present, 1));
if (meas_result_neigh_cells_v12d0_present) {
HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_v12d0, bref, 1, 8));
}
return SRSASN_SUCCESS;
}
void fail_report_scg_v12d0_s::to_json(json_writer& j) const
{
j.start_obj();
if (meas_result_neigh_cells_v12d0_present) {
j.start_array("measResultNeighCells-v12d0");
for (const auto& e1 : meas_result_neigh_cells_v12d0) {
e1.to_json(j);
}
j.end_array();
}
j.end_obj();
}
// MIMO-WeightedLayersCapabilities-r13 ::= SEQUENCE // MIMO-WeightedLayersCapabilities-r13 ::= SEQUENCE
SRSASN_CODE mimo_weighted_layers_cap_r13_s::pack(bit_ref& bref) const SRSASN_CODE mimo_weighted_layers_cap_r13_s::pack(bit_ref& bref) const
{ {
@ -5329,34 +5118,36 @@ void phy_layer_params_v13e0_s::to_json(json_writer& j) const
j.end_obj(); j.end_obj();
} }
std::string mbms_params_v1470_s::mbms_max_bw_r14_c_::types_opts::to_string() const // SCGFailureInformation-v12d0b-IEs ::= SEQUENCE
{ SRSASN_CODE scg_fail_info_v12d0b_ies_s::pack(bit_ref& bref) const
static const char* options[] = {"implicitValue", "explicitValue"};
return convert_enum_idx(options, 2, value, "mbms_params_v1470_s::mbms_max_bw_r14_c_::types");
}
// UE-EUTRA-Capability-v13e0b-IEs ::= SEQUENCE
SRSASN_CODE ue_eutra_cap_v13e0b_ies_s::pack(bit_ref& bref) const
{ {
HANDLE_CODE(bref.pack(fail_report_scg_v12d0_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
HANDLE_CODE(phy_layer_params_v13e0.pack(bref)); if (fail_report_scg_v12d0_present) {
HANDLE_CODE(fail_report_scg_v12d0.pack(bref));
}
return SRSASN_SUCCESS; return SRSASN_SUCCESS;
} }
SRSASN_CODE ue_eutra_cap_v13e0b_ies_s::unpack(cbit_ref& bref) SRSASN_CODE scg_fail_info_v12d0b_ies_s::unpack(cbit_ref& bref)
{ {
HANDLE_CODE(bref.unpack(fail_report_scg_v12d0_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
HANDLE_CODE(phy_layer_params_v13e0.unpack(bref)); if (fail_report_scg_v12d0_present) {
HANDLE_CODE(fail_report_scg_v12d0.unpack(bref));
}
return SRSASN_SUCCESS; return SRSASN_SUCCESS;
} }
void ue_eutra_cap_v13e0b_ies_s::to_json(json_writer& j) const void scg_fail_info_v12d0b_ies_s::to_json(json_writer& j) const
{ {
j.start_obj(); j.start_obj();
j.write_fieldname("phyLayerParameters-v13e0"); if (fail_report_scg_v12d0_present) {
phy_layer_params_v13e0.to_json(j); j.write_fieldname("failureReportSCG-v12d0");
fail_report_scg_v12d0.to_json(j);
}
if (non_crit_ext_present) { if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension"); j.write_fieldname("nonCriticalExtension");
j.start_obj(); j.start_obj();
@ -5365,36 +5156,34 @@ void ue_eutra_cap_v13e0b_ies_s::to_json(json_writer& j) const
j.end_obj(); j.end_obj();
} }
// SCG-Config-v12i0b-IEs ::= SEQUENCE std::string mbms_params_v1470_s::mbms_max_bw_r14_c_::types_opts::to_string() const
SRSASN_CODE scg_cfg_v12i0b_ies_s::pack(bit_ref& bref) const {
static const char* options[] = {"implicitValue", "explicitValue"};
return convert_enum_idx(options, 2, value, "mbms_params_v1470_s::mbms_max_bw_r14_c_::types");
}
// UE-EUTRA-Capability-v13e0b-IEs ::= SEQUENCE
SRSASN_CODE ue_eutra_cap_v13e0b_ies_s::pack(bit_ref& bref) const
{ {
HANDLE_CODE(bref.pack(scg_radio_cfg_v12i0_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
if (scg_radio_cfg_v12i0_present) { HANDLE_CODE(phy_layer_params_v13e0.pack(bref));
HANDLE_CODE(scg_radio_cfg_v12i0.pack(bref));
}
return SRSASN_SUCCESS; return SRSASN_SUCCESS;
} }
SRSASN_CODE scg_cfg_v12i0b_ies_s::unpack(cbit_ref& bref) SRSASN_CODE ue_eutra_cap_v13e0b_ies_s::unpack(cbit_ref& bref)
{ {
HANDLE_CODE(bref.unpack(scg_radio_cfg_v12i0_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
if (scg_radio_cfg_v12i0_present) { HANDLE_CODE(phy_layer_params_v13e0.unpack(bref));
HANDLE_CODE(scg_radio_cfg_v12i0.unpack(bref));
}
return SRSASN_SUCCESS; return SRSASN_SUCCESS;
} }
void scg_cfg_v12i0b_ies_s::to_json(json_writer& j) const void ue_eutra_cap_v13e0b_ies_s::to_json(json_writer& j) const
{ {
j.start_obj(); j.start_obj();
if (scg_radio_cfg_v12i0_present) { j.write_fieldname("phyLayerParameters-v13e0");
j.write_fieldname("scg-RadioConfig-v12i0"); phy_layer_params_v13e0.to_json(j);
scg_radio_cfg_v12i0.to_json(j);
}
if (non_crit_ext_present) { if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension"); j.write_fieldname("nonCriticalExtension");
j.start_obj(); j.start_obj();
@ -6104,6 +5893,44 @@ void sbcch_sl_bch_msg_v2x_r14_s::to_json(json_writer& j) const
j.end_array(); j.end_array();
} }
// SCG-Config-v12i0b-IEs ::= SEQUENCE
SRSASN_CODE scg_cfg_v12i0b_ies_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(scg_radio_cfg_v12i0_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
if (scg_radio_cfg_v12i0_present) {
HANDLE_CODE(scg_radio_cfg_v12i0.pack(bref));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE scg_cfg_v12i0b_ies_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(scg_radio_cfg_v12i0_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
if (scg_radio_cfg_v12i0_present) {
HANDLE_CODE(scg_radio_cfg_v12i0.unpack(bref));
}
return SRSASN_SUCCESS;
}
void scg_cfg_v12i0b_ies_s::to_json(json_writer& j) const
{
j.start_obj();
if (scg_radio_cfg_v12i0_present) {
j.write_fieldname("scg-RadioConfig-v12i0");
scg_radio_cfg_v12i0.to_json(j);
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
}
j.end_obj();
}
// SCG-ConfigInfo-v1530-IEs ::= SEQUENCE // SCG-ConfigInfo-v1530-IEs ::= SEQUENCE
SRSASN_CODE scg_cfg_info_v1530_ies_s::pack(bit_ref& bref) const SRSASN_CODE scg_cfg_info_v1530_ies_s::pack(bit_ref& bref) const
{ {
@ -6615,67 +6442,9 @@ void scg_cfg_info_r12_s::to_json(json_writer& j) const
j.end_obj(); j.end_obj();
} }
void scg_cfg_info_r12_s::crit_exts_c_::destroy_()
{
switch (type_) {
case types::c1:
c.destroy<c1_c_>();
break;
default:
break;
}
}
void scg_cfg_info_r12_s::crit_exts_c_::set(types::options e) void scg_cfg_info_r12_s::crit_exts_c_::set(types::options e)
{ {
destroy_();
type_ = e; type_ = e;
switch (type_) {
case types::c1:
c.init<c1_c_>();
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<c1_c_>());
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<c1_c_>());
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 void scg_cfg_info_r12_s::crit_exts_c_::to_json(json_writer& j) const
{ {
@ -6683,7 +6452,7 @@ void scg_cfg_info_r12_s::crit_exts_c_::to_json(json_writer& j) const
switch (type_) { switch (type_) {
case types::c1: case types::c1:
j.write_fieldname("c1"); j.write_fieldname("c1");
c.get<c1_c_>().to_json(j); c.to_json(j);
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -6697,7 +6466,7 @@ SRSASN_CODE scg_cfg_info_r12_s::crit_exts_c_::pack(bit_ref& bref) const
type_.pack(bref); type_.pack(bref);
switch (type_) { switch (type_) {
case types::c1: case types::c1:
HANDLE_CODE(c.get<c1_c_>().pack(bref)); HANDLE_CODE(c.pack(bref));
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -6714,7 +6483,7 @@ SRSASN_CODE scg_cfg_info_r12_s::crit_exts_c_::unpack(cbit_ref& bref)
set(e); set(e);
switch (type_) { switch (type_) {
case types::c1: case types::c1:
HANDLE_CODE(c.get<c1_c_>().unpack(bref)); HANDLE_CODE(c.unpack(bref));
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;

File diff suppressed because it is too large Load Diff

@ -1336,66 +1336,9 @@ void rrc_conn_reest_s::to_json(json_writer& j) const
j.end_obj(); j.end_obj();
} }
void rrc_conn_reest_s::crit_exts_c_::destroy_()
{
switch (type_) {
case types::c1:
c.destroy<c1_c_>();
break;
default:
break;
}
}
void rrc_conn_reest_s::crit_exts_c_::set(types::options e) void rrc_conn_reest_s::crit_exts_c_::set(types::options e)
{ {
destroy_();
type_ = e; type_ = e;
switch (type_) {
case types::c1:
c.init<c1_c_>();
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<c1_c_>());
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<c1_c_>());
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 void rrc_conn_reest_s::crit_exts_c_::to_json(json_writer& j) const
{ {
@ -1403,7 +1346,7 @@ void rrc_conn_reest_s::crit_exts_c_::to_json(json_writer& j) const
switch (type_) { switch (type_) {
case types::c1: case types::c1:
j.write_fieldname("c1"); j.write_fieldname("c1");
c.get<c1_c_>().to_json(j); c.to_json(j);
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -1417,7 +1360,7 @@ SRSASN_CODE rrc_conn_reest_s::crit_exts_c_::pack(bit_ref& bref) const
type_.pack(bref); type_.pack(bref);
switch (type_) { switch (type_) {
case types::c1: case types::c1:
HANDLE_CODE(c.get<c1_c_>().pack(bref)); HANDLE_CODE(c.pack(bref));
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -1434,7 +1377,7 @@ SRSASN_CODE rrc_conn_reest_s::crit_exts_c_::unpack(cbit_ref& bref)
set(e); set(e);
switch (type_) { switch (type_) {
case types::c1: case types::c1:
HANDLE_CODE(c.get<c1_c_>().unpack(bref)); HANDLE_CODE(c.unpack(bref));
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -1554,67 +1497,9 @@ void rrc_conn_reest_reject_s::to_json(json_writer& j) const
j.end_obj(); j.end_obj();
} }
void rrc_conn_reest_reject_s::crit_exts_c_::destroy_()
{
switch (type_) {
case types::rrc_conn_reest_reject_r8:
c.destroy<rrc_conn_reest_reject_r8_ies_s>();
break;
default:
break;
}
}
void rrc_conn_reest_reject_s::crit_exts_c_::set(types::options e) void rrc_conn_reest_reject_s::crit_exts_c_::set(types::options e)
{ {
destroy_();
type_ = e; type_ = e;
switch (type_) {
case types::rrc_conn_reest_reject_r8:
c.init<rrc_conn_reest_reject_r8_ies_s>();
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<rrc_conn_reest_reject_r8_ies_s>());
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<rrc_conn_reest_reject_r8_ies_s>());
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 void rrc_conn_reest_reject_s::crit_exts_c_::to_json(json_writer& j) const
{ {
@ -1622,7 +1507,7 @@ void rrc_conn_reest_reject_s::crit_exts_c_::to_json(json_writer& j) const
switch (type_) { switch (type_) {
case types::rrc_conn_reest_reject_r8: case types::rrc_conn_reest_reject_r8:
j.write_fieldname("rrcConnectionReestablishmentReject-r8"); j.write_fieldname("rrcConnectionReestablishmentReject-r8");
c.get<rrc_conn_reest_reject_r8_ies_s>().to_json(j); c.to_json(j);
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -1636,7 +1521,7 @@ SRSASN_CODE rrc_conn_reest_reject_s::crit_exts_c_::pack(bit_ref& bref) const
type_.pack(bref); type_.pack(bref);
switch (type_) { switch (type_) {
case types::rrc_conn_reest_reject_r8: case types::rrc_conn_reest_reject_r8:
HANDLE_CODE(c.get<rrc_conn_reest_reject_r8_ies_s>().pack(bref)); HANDLE_CODE(c.pack(bref));
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -1653,7 +1538,7 @@ SRSASN_CODE rrc_conn_reest_reject_s::crit_exts_c_::unpack(cbit_ref& bref)
set(e); set(e);
switch (type_) { switch (type_) {
case types::rrc_conn_reest_reject_r8: case types::rrc_conn_reest_reject_r8:
HANDLE_CODE(c.get<rrc_conn_reest_reject_r8_ies_s>().unpack(bref)); HANDLE_CODE(c.unpack(bref));
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -1685,67 +1570,9 @@ void rrc_conn_reject_s::to_json(json_writer& j) const
j.end_obj(); j.end_obj();
} }
void rrc_conn_reject_s::crit_exts_c_::destroy_()
{
switch (type_) {
case types::c1:
c.destroy<c1_c_>();
break;
default:
break;
}
}
void rrc_conn_reject_s::crit_exts_c_::set(types::options e) void rrc_conn_reject_s::crit_exts_c_::set(types::options e)
{ {
destroy_();
type_ = e; type_ = e;
switch (type_) {
case types::c1:
c.init<c1_c_>();
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<c1_c_>());
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<c1_c_>());
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 void rrc_conn_reject_s::crit_exts_c_::to_json(json_writer& j) const
{ {
@ -1753,7 +1580,7 @@ void rrc_conn_reject_s::crit_exts_c_::to_json(json_writer& j) const
switch (type_) { switch (type_) {
case types::c1: case types::c1:
j.write_fieldname("c1"); j.write_fieldname("c1");
c.get<c1_c_>().to_json(j); c.to_json(j);
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -1767,7 +1594,7 @@ SRSASN_CODE rrc_conn_reject_s::crit_exts_c_::pack(bit_ref& bref) const
type_.pack(bref); type_.pack(bref);
switch (type_) { switch (type_) {
case types::c1: case types::c1:
HANDLE_CODE(c.get<c1_c_>().pack(bref)); HANDLE_CODE(c.pack(bref));
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -1784,7 +1611,7 @@ SRSASN_CODE rrc_conn_reject_s::crit_exts_c_::unpack(cbit_ref& bref)
set(e); set(e);
switch (type_) { switch (type_) {
case types::c1: case types::c1:
HANDLE_CODE(c.get<c1_c_>().unpack(bref)); HANDLE_CODE(c.unpack(bref));
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -1883,66 +1710,9 @@ void rrc_conn_setup_s::to_json(json_writer& j) const
j.end_obj(); j.end_obj();
} }
void rrc_conn_setup_s::crit_exts_c_::destroy_()
{
switch (type_) {
case types::c1:
c.destroy<c1_c_>();
break;
default:
break;
}
}
void rrc_conn_setup_s::crit_exts_c_::set(types::options e) void rrc_conn_setup_s::crit_exts_c_::set(types::options e)
{ {
destroy_();
type_ = e; type_ = e;
switch (type_) {
case types::c1:
c.init<c1_c_>();
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<c1_c_>());
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<c1_c_>());
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 void rrc_conn_setup_s::crit_exts_c_::to_json(json_writer& j) const
{ {
@ -1950,7 +1720,7 @@ void rrc_conn_setup_s::crit_exts_c_::to_json(json_writer& j) const
switch (type_) { switch (type_) {
case types::c1: case types::c1:
j.write_fieldname("c1"); j.write_fieldname("c1");
c.get<c1_c_>().to_json(j); c.to_json(j);
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -1964,7 +1734,7 @@ SRSASN_CODE rrc_conn_setup_s::crit_exts_c_::pack(bit_ref& bref) const
type_.pack(bref); type_.pack(bref);
switch (type_) { switch (type_) {
case types::c1: case types::c1:
HANDLE_CODE(c.get<c1_c_>().pack(bref)); HANDLE_CODE(c.pack(bref));
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -1981,7 +1751,7 @@ SRSASN_CODE rrc_conn_setup_s::crit_exts_c_::unpack(cbit_ref& bref)
set(e); set(e);
switch (type_) { switch (type_) {
case types::c1: case types::c1:
HANDLE_CODE(c.get<c1_c_>().unpack(bref)); HANDLE_CODE(c.unpack(bref));
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -2101,67 +1871,9 @@ void rrc_early_data_complete_r15_s::to_json(json_writer& j) const
j.end_obj(); 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<rrc_early_data_complete_r15_ies_s>();
break;
default:
break;
}
}
void rrc_early_data_complete_r15_s::crit_exts_c_::set(types::options e) void rrc_early_data_complete_r15_s::crit_exts_c_::set(types::options e)
{ {
destroy_();
type_ = e; type_ = e;
switch (type_) {
case types::rrc_early_data_complete_r15:
c.init<rrc_early_data_complete_r15_ies_s>();
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<rrc_early_data_complete_r15_ies_s>());
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<rrc_early_data_complete_r15_ies_s>());
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 void rrc_early_data_complete_r15_s::crit_exts_c_::to_json(json_writer& j) const
{ {
@ -2169,7 +1881,7 @@ void rrc_early_data_complete_r15_s::crit_exts_c_::to_json(json_writer& j) const
switch (type_) { switch (type_) {
case types::rrc_early_data_complete_r15: case types::rrc_early_data_complete_r15:
j.write_fieldname("rrcEarlyDataComplete-r15"); j.write_fieldname("rrcEarlyDataComplete-r15");
c.get<rrc_early_data_complete_r15_ies_s>().to_json(j); c.to_json(j);
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -2183,7 +1895,7 @@ SRSASN_CODE rrc_early_data_complete_r15_s::crit_exts_c_::pack(bit_ref& bref) con
type_.pack(bref); type_.pack(bref);
switch (type_) { switch (type_) {
case types::rrc_early_data_complete_r15: case types::rrc_early_data_complete_r15:
HANDLE_CODE(c.get<rrc_early_data_complete_r15_ies_s>().pack(bref)); HANDLE_CODE(c.pack(bref));
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -2200,7 +1912,7 @@ SRSASN_CODE rrc_early_data_complete_r15_s::crit_exts_c_::unpack(cbit_ref& bref)
set(e); set(e);
switch (type_) { switch (type_) {
case types::rrc_early_data_complete_r15: case types::rrc_early_data_complete_r15:
HANDLE_CODE(c.get<rrc_early_data_complete_r15_ies_s>().unpack(bref)); HANDLE_CODE(c.unpack(bref));
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -2494,67 +2206,9 @@ SRSASN_CODE dl_ccch_msg_type_c::c1_c_::unpack(cbit_ref& bref)
return SRSASN_SUCCESS; return SRSASN_SUCCESS;
} }
void dl_ccch_msg_type_c::msg_class_ext_c_::destroy_()
{
switch (type_) {
case types::c2:
c.destroy<c2_c_>();
break;
default:
break;
}
}
void dl_ccch_msg_type_c::msg_class_ext_c_::set(types::options e) void dl_ccch_msg_type_c::msg_class_ext_c_::set(types::options e)
{ {
destroy_();
type_ = e; type_ = e;
switch (type_) {
case types::c2:
c.init<c2_c_>();
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<c2_c_>());
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<c2_c_>());
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 void dl_ccch_msg_type_c::msg_class_ext_c_::to_json(json_writer& j) const
{ {
@ -2562,7 +2216,7 @@ void dl_ccch_msg_type_c::msg_class_ext_c_::to_json(json_writer& j) const
switch (type_) { switch (type_) {
case types::c2: case types::c2:
j.write_fieldname("c2"); j.write_fieldname("c2");
c.get<c2_c_>().to_json(j); c.to_json(j);
break; break;
case types::msg_class_ext_future_r15: case types::msg_class_ext_future_r15:
break; break;
@ -2576,7 +2230,7 @@ SRSASN_CODE dl_ccch_msg_type_c::msg_class_ext_c_::pack(bit_ref& bref) const
type_.pack(bref); type_.pack(bref);
switch (type_) { switch (type_) {
case types::c2: case types::c2:
HANDLE_CODE(c.get<c2_c_>().pack(bref)); HANDLE_CODE(c.pack(bref));
break; break;
case types::msg_class_ext_future_r15: case types::msg_class_ext_future_r15:
break; break;
@ -2593,7 +2247,7 @@ SRSASN_CODE dl_ccch_msg_type_c::msg_class_ext_c_::unpack(cbit_ref& bref)
set(e); set(e);
switch (type_) { switch (type_) {
case types::c2: case types::c2:
HANDLE_CODE(c.get<c2_c_>().unpack(bref)); HANDLE_CODE(c.unpack(bref));
break; break;
case types::msg_class_ext_future_r15: case types::msg_class_ext_future_r15:
break; break;

File diff suppressed because it is too large Load Diff

@ -288,66 +288,9 @@ void scg_cfg_r12_s::to_json(json_writer& j) const
j.end_obj(); j.end_obj();
} }
void scg_cfg_r12_s::crit_exts_c_::destroy_()
{
switch (type_) {
case types::c1:
c.destroy<c1_c_>();
break;
default:
break;
}
}
void scg_cfg_r12_s::crit_exts_c_::set(types::options e) void scg_cfg_r12_s::crit_exts_c_::set(types::options e)
{ {
destroy_();
type_ = e; type_ = e;
switch (type_) {
case types::c1:
c.init<c1_c_>();
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<c1_c_>());
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<c1_c_>());
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 void scg_cfg_r12_s::crit_exts_c_::to_json(json_writer& j) const
{ {
@ -355,7 +298,7 @@ void scg_cfg_r12_s::crit_exts_c_::to_json(json_writer& j) const
switch (type_) { switch (type_) {
case types::c1: case types::c1:
j.write_fieldname("c1"); j.write_fieldname("c1");
c.get<c1_c_>().to_json(j); c.to_json(j);
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -369,7 +312,7 @@ SRSASN_CODE scg_cfg_r12_s::crit_exts_c_::pack(bit_ref& bref) const
type_.pack(bref); type_.pack(bref);
switch (type_) { switch (type_) {
case types::c1: case types::c1:
HANDLE_CODE(c.get<c1_c_>().pack(bref)); HANDLE_CODE(c.pack(bref));
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -386,7 +329,7 @@ SRSASN_CODE scg_cfg_r12_s::crit_exts_c_::unpack(cbit_ref& bref)
set(e); set(e);
switch (type_) { switch (type_) {
case types::c1: case types::c1:
HANDLE_CODE(c.get<c1_c_>().unpack(bref)); HANDLE_CODE(c.unpack(bref));
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -1402,66 +1345,9 @@ void ho_cmd_s::to_json(json_writer& j) const
j.end_obj(); j.end_obj();
} }
void ho_cmd_s::crit_exts_c_::destroy_()
{
switch (type_) {
case types::c1:
c.destroy<c1_c_>();
break;
default:
break;
}
}
void ho_cmd_s::crit_exts_c_::set(types::options e) void ho_cmd_s::crit_exts_c_::set(types::options e)
{ {
destroy_();
type_ = e; type_ = e;
switch (type_) {
case types::c1:
c.init<c1_c_>();
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<c1_c_>());
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<c1_c_>());
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 void ho_cmd_s::crit_exts_c_::to_json(json_writer& j) const
{ {
@ -1469,7 +1355,7 @@ void ho_cmd_s::crit_exts_c_::to_json(json_writer& j) const
switch (type_) { switch (type_) {
case types::c1: case types::c1:
j.write_fieldname("c1"); j.write_fieldname("c1");
c.get<c1_c_>().to_json(j); c.to_json(j);
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -1483,7 +1369,7 @@ SRSASN_CODE ho_cmd_s::crit_exts_c_::pack(bit_ref& bref) const
type_.pack(bref); type_.pack(bref);
switch (type_) { switch (type_) {
case types::c1: case types::c1:
HANDLE_CODE(c.get<c1_c_>().pack(bref)); HANDLE_CODE(c.pack(bref));
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -1500,7 +1386,7 @@ SRSASN_CODE ho_cmd_s::crit_exts_c_::unpack(cbit_ref& bref)
set(e); set(e);
switch (type_) { switch (type_) {
case types::c1: case types::c1:
HANDLE_CODE(c.get<c1_c_>().unpack(bref)); HANDLE_CODE(c.unpack(bref));
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -1782,86 +1668,6 @@ void ho_prep_info_v1320_ies_s::to_json(json_writer& j) const
j.end_obj(); j.end_obj();
} }
// HandoverPreparationInformation-v13c0-IEs ::= SEQUENCE
SRSASN_CODE ho_prep_info_v13c0_ies_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(as_cfg_v13c0_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
if (as_cfg_v13c0_present) {
HANDLE_CODE(as_cfg_v13c0.pack(bref));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE ho_prep_info_v13c0_ies_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(as_cfg_v13c0_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
if (as_cfg_v13c0_present) {
HANDLE_CODE(as_cfg_v13c0.unpack(bref));
}
return SRSASN_SUCCESS;
}
void ho_prep_info_v13c0_ies_s::to_json(json_writer& j) const
{
j.start_obj();
if (as_cfg_v13c0_present) {
j.write_fieldname("as-Config-v13c0");
as_cfg_v13c0.to_json(j);
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
}
j.end_obj();
}
// HandoverPreparationInformation-v10x0-IEs ::= SEQUENCE
SRSASN_CODE ho_prep_info_v10x0_ies_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
if (late_non_crit_ext_present) {
HANDLE_CODE(late_non_crit_ext.pack(bref));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.pack(bref));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE ho_prep_info_v10x0_ies_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
if (late_non_crit_ext_present) {
HANDLE_CODE(late_non_crit_ext.unpack(bref));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.unpack(bref));
}
return SRSASN_SUCCESS;
}
void ho_prep_info_v10x0_ies_s::to_json(json_writer& j) const
{
j.start_obj();
if (late_non_crit_ext_present) {
j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string());
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
non_crit_ext.to_json(j);
}
j.end_obj();
}
// HandoverPreparationInformation-v1250-IEs ::= SEQUENCE // HandoverPreparationInformation-v1250-IEs ::= SEQUENCE
SRSASN_CODE ho_prep_info_v1250_ies_s::pack(bit_ref& bref) const SRSASN_CODE ho_prep_info_v1250_ies_s::pack(bit_ref& bref) const
{ {
@ -1916,49 +1722,6 @@ void ho_prep_info_v1250_ies_s::to_json(json_writer& j) const
j.end_obj(); j.end_obj();
} }
// HandoverPreparationInformation-v10j0-IEs ::= SEQUENCE
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));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.pack(bref));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE ho_prep_info_v10j0_ies_s::unpack(cbit_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));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.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");
non_crit_ext.to_json(j);
}
j.end_obj();
}
// HandoverPreparationInformation-v1130-IEs ::= SEQUENCE // HandoverPreparationInformation-v1130-IEs ::= SEQUENCE
SRSASN_CODE ho_prep_info_v1130_ies_s::pack(bit_ref& bref) const SRSASN_CODE ho_prep_info_v1130_ies_s::pack(bit_ref& bref) const
{ {
@ -2045,48 +1808,6 @@ void ho_prep_info_v9e0_ies_s::to_json(json_writer& j) const
j.end_obj(); j.end_obj();
} }
// HandoverPreparationInformation-v9j0-IEs ::= SEQUENCE
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(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
if (late_non_crit_ext_present) {
HANDLE_CODE(late_non_crit_ext.unpack(bref));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.unpack(bref));
}
return SRSASN_SUCCESS;
}
void 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 // HandoverPreparationInformation-v9d0-IEs ::= SEQUENCE
SRSASN_CODE ho_prep_info_v9d0_ies_s::pack(bit_ref& bref) const SRSASN_CODE ho_prep_info_v9d0_ies_s::pack(bit_ref& bref) const
{ {
@ -2382,66 +2103,9 @@ void ho_prep_info_s::to_json(json_writer& j) const
j.end_obj(); j.end_obj();
} }
void ho_prep_info_s::crit_exts_c_::destroy_()
{
switch (type_) {
case types::c1:
c.destroy<c1_c_>();
break;
default:
break;
}
}
void ho_prep_info_s::crit_exts_c_::set(types::options e) void ho_prep_info_s::crit_exts_c_::set(types::options e)
{ {
destroy_();
type_ = e; type_ = e;
switch (type_) {
case types::c1:
c.init<c1_c_>();
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<c1_c_>());
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<c1_c_>());
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 void ho_prep_info_s::crit_exts_c_::to_json(json_writer& j) const
{ {
@ -2449,7 +2113,7 @@ void ho_prep_info_s::crit_exts_c_::to_json(json_writer& j) const
switch (type_) { switch (type_) {
case types::c1: case types::c1:
j.write_fieldname("c1"); j.write_fieldname("c1");
c.get<c1_c_>().to_json(j); c.to_json(j);
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -2463,7 +2127,7 @@ SRSASN_CODE ho_prep_info_s::crit_exts_c_::pack(bit_ref& bref) const
type_.pack(bref); type_.pack(bref);
switch (type_) { switch (type_) {
case types::c1: case types::c1:
HANDLE_CODE(c.get<c1_c_>().pack(bref)); HANDLE_CODE(c.pack(bref));
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -2480,7 +2144,7 @@ SRSASN_CODE ho_prep_info_s::crit_exts_c_::unpack(cbit_ref& bref)
set(e); set(e);
switch (type_) { switch (type_) {
case types::c1: case types::c1:
HANDLE_CODE(c.get<c1_c_>().unpack(bref)); HANDLE_CODE(c.unpack(bref));
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -2579,6 +2243,171 @@ SRSASN_CODE ho_prep_info_s::crit_exts_c_::c1_c_::unpack(cbit_ref& bref)
return SRSASN_SUCCESS; return SRSASN_SUCCESS;
} }
// HandoverPreparationInformation-v13c0-IEs ::= SEQUENCE
SRSASN_CODE ho_prep_info_v13c0_ies_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(as_cfg_v13c0_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
if (as_cfg_v13c0_present) {
HANDLE_CODE(as_cfg_v13c0.pack(bref));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE ho_prep_info_v13c0_ies_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(as_cfg_v13c0_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
if (as_cfg_v13c0_present) {
HANDLE_CODE(as_cfg_v13c0.unpack(bref));
}
return SRSASN_SUCCESS;
}
void ho_prep_info_v13c0_ies_s::to_json(json_writer& j) const
{
j.start_obj();
if (as_cfg_v13c0_present) {
j.write_fieldname("as-Config-v13c0");
as_cfg_v13c0.to_json(j);
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
}
j.end_obj();
}
// HandoverPreparationInformation-v10x0-IEs ::= SEQUENCE
SRSASN_CODE ho_prep_info_v10x0_ies_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
if (late_non_crit_ext_present) {
HANDLE_CODE(late_non_crit_ext.pack(bref));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.pack(bref));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE ho_prep_info_v10x0_ies_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
if (late_non_crit_ext_present) {
HANDLE_CODE(late_non_crit_ext.unpack(bref));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.unpack(bref));
}
return SRSASN_SUCCESS;
}
void ho_prep_info_v10x0_ies_s::to_json(json_writer& j) const
{
j.start_obj();
if (late_non_crit_ext_present) {
j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string());
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
non_crit_ext.to_json(j);
}
j.end_obj();
}
// HandoverPreparationInformation-v10j0-IEs ::= SEQUENCE
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));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.pack(bref));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE ho_prep_info_v10j0_ies_s::unpack(cbit_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));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.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");
non_crit_ext.to_json(j);
}
j.end_obj();
}
// HandoverPreparationInformation-v9j0-IEs ::= SEQUENCE
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(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
if (late_non_crit_ext_present) {
HANDLE_CODE(late_non_crit_ext.unpack(bref));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.unpack(bref));
}
return SRSASN_SUCCESS;
}
void 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();
}
// VarMeasConfig ::= SEQUENCE // VarMeasConfig ::= SEQUENCE
SRSASN_CODE var_meas_cfg_s::pack(bit_ref& bref) const SRSASN_CODE var_meas_cfg_s::pack(bit_ref& bref) const
{ {

@ -10244,36 +10244,6 @@ void carrier_freq_geran_s::to_json(json_writer& j) const
j.end_obj(); j.end_obj();
} }
// MobilityControlInfo-v10l0 ::= SEQUENCE
SRSASN_CODE mob_ctrl_info_v10l0_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(add_spec_emission_v10l0_present, 1));
if (add_spec_emission_v10l0_present) {
HANDLE_CODE(pack_integer(bref, add_spec_emission_v10l0, (uint16_t)33u, (uint16_t)288u));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE mob_ctrl_info_v10l0_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(add_spec_emission_v10l0_present, 1));
if (add_spec_emission_v10l0_present) {
HANDLE_CODE(unpack_integer(add_spec_emission_v10l0, bref, (uint16_t)33u, (uint16_t)288u));
}
return SRSASN_SUCCESS;
}
void mob_ctrl_info_v10l0_s::to_json(json_writer& j) const
{
j.start_obj();
if (add_spec_emission_v10l0_present) {
j.write_int("additionalSpectrumEmission-v10l0", add_spec_emission_v10l0);
}
j.end_obj();
}
// LoggedMeasurementConfiguration-v1530-IEs ::= SEQUENCE // LoggedMeasurementConfiguration-v1530-IEs ::= SEQUENCE
SRSASN_CODE logged_meas_cfg_v1530_ies_s::pack(bit_ref& bref) const SRSASN_CODE logged_meas_cfg_v1530_ies_s::pack(bit_ref& bref) const
{ {
@ -14700,66 +14670,9 @@ void meas_report_s::to_json(json_writer& j) const
j.end_obj(); j.end_obj();
} }
void meas_report_s::crit_exts_c_::destroy_()
{
switch (type_) {
case types::c1:
c.destroy<c1_c_>();
break;
default:
break;
}
}
void meas_report_s::crit_exts_c_::set(types::options e) void meas_report_s::crit_exts_c_::set(types::options e)
{ {
destroy_();
type_ = e; type_ = e;
switch (type_) {
case types::c1:
c.init<c1_c_>();
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<c1_c_>());
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<c1_c_>());
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 void meas_report_s::crit_exts_c_::to_json(json_writer& j) const
{ {
@ -14767,7 +14680,7 @@ void meas_report_s::crit_exts_c_::to_json(json_writer& j) const
switch (type_) { switch (type_) {
case types::c1: case types::c1:
j.write_fieldname("c1"); j.write_fieldname("c1");
c.get<c1_c_>().to_json(j); c.to_json(j);
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -14781,7 +14694,7 @@ SRSASN_CODE meas_report_s::crit_exts_c_::pack(bit_ref& bref) const
type_.pack(bref); type_.pack(bref);
switch (type_) { switch (type_) {
case types::c1: case types::c1:
HANDLE_CODE(c.get<c1_c_>().pack(bref)); HANDLE_CODE(c.pack(bref));
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -14798,7 +14711,7 @@ SRSASN_CODE meas_report_s::crit_exts_c_::unpack(cbit_ref& bref)
set(e); set(e);
switch (type_) { switch (type_) {
case types::c1: case types::c1:
HANDLE_CODE(c.get<c1_c_>().unpack(bref)); HANDLE_CODE(c.unpack(bref));
break; break;
case types::crit_exts_future: case types::crit_exts_future:
break; break;
@ -14896,3 +14809,33 @@ SRSASN_CODE meas_report_s::crit_exts_c_::c1_c_::unpack(cbit_ref& bref)
} }
return SRSASN_SUCCESS; return SRSASN_SUCCESS;
} }
// MobilityControlInfo-v10l0 ::= SEQUENCE
SRSASN_CODE mob_ctrl_info_v10l0_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(add_spec_emission_v10l0_present, 1));
if (add_spec_emission_v10l0_present) {
HANDLE_CODE(pack_integer(bref, add_spec_emission_v10l0, (uint16_t)33u, (uint16_t)288u));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE mob_ctrl_info_v10l0_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(add_spec_emission_v10l0_present, 1));
if (add_spec_emission_v10l0_present) {
HANDLE_CODE(unpack_integer(add_spec_emission_v10l0, bref, (uint16_t)33u, (uint16_t)288u));
}
return SRSASN_SUCCESS;
}
void mob_ctrl_info_v10l0_s::to_json(json_writer& j) const
{
j.start_obj();
if (add_spec_emission_v10l0_present) {
j.write_int("additionalSpectrumEmission-v10l0", add_spec_emission_v10l0);
}
j.end_obj();
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save