fix 5g compilation errors

This commit is contained in:
Francisco Paisana 2020-03-25 15:27:12 +00:00 committed by Francisco Paisana
parent 344eaf49ec
commit 8aa44928e9
9 changed files with 36 additions and 38 deletions

View File

@ -45,7 +45,7 @@ public:
srsue::rrc_interface_pdcp* rrc_,
srsue::gw_interface_pdcp* gw_,
srslte::timer_handler* timers_,
srslte::log* log_);
srslte::log_ref log_);
~pdcp_entity_nr();
void init(uint32_t lcid_, pdcp_config_t cfg_);
void reset();

View File

@ -43,7 +43,7 @@ typedef struct {
class rlc_um_nr : public rlc_um_base
{
public:
rlc_um_nr(srslte::log* log_,
rlc_um_nr(srslte::log_ref log_,
uint32_t lcid_,
srsue::pdcp_interface_rlc* pdcp_,
srsue::rrc_interface_rlc* rrc_,

View File

@ -28,7 +28,7 @@ pdcp_entity_nr::pdcp_entity_nr(srsue::rlc_interface_pdcp* rlc_,
srsue::rrc_interface_pdcp* rrc_,
srsue::gw_interface_pdcp* gw_,
srslte::timer_handler* timers_,
srslte::log* log_) :
srslte::log_ref log_) :
pdcp_entity_base(timers_, log_),
rlc(rlc_),
rrc(rrc_),
@ -41,9 +41,9 @@ pdcp_entity_nr::~pdcp_entity_nr() {}
void pdcp_entity_nr::init(uint32_t lcid_, pdcp_config_t cfg_)
{
lcid = lcid_;
cfg = cfg_;
active = true;
lcid = lcid_;
cfg = cfg_;
active = true;
integrity_direction = DIRECTION_NONE;
encryption_direction = DIRECTION_NONE;
@ -72,9 +72,7 @@ void pdcp_entity_nr::reestablish()
void pdcp_entity_nr::reset()
{
active = false;
if (log != nullptr) {
log->debug("Reset %s\n", rrc->get_rb_name(lcid).c_str());
}
log->debug("Reset %s\n", rrc->get_rb_name(lcid).c_str());
}
// SDAP/RRC interface

View File

@ -28,7 +28,7 @@ using namespace asn1::rrc;
namespace srslte {
rlc_um_nr::rlc_um_nr(srslte::log* log_,
rlc_um_nr::rlc_um_nr(srslte::log_ref log_,
uint32_t lcid_,
srsue::pdcp_interface_rlc* pdcp_,
srsue::rrc_interface_rlc* rrc_,

View File

@ -95,7 +95,7 @@ pdcp_initial_state near_wraparound_init_state = {.tx_next = 4294967295,
class pdcp_nr_test_helper
{
public:
pdcp_nr_test_helper(srslte::pdcp_config_t cfg, srslte::as_security_config_t sec_cfg, srslte::log* log) :
pdcp_nr_test_helper(srslte::pdcp_config_t cfg, srslte::as_security_config_t sec_cfg, srslte::log_ref log) :
rlc(log),
rrc(log),
gw(log),
@ -129,7 +129,7 @@ srslte::unique_byte_buffer_t gen_expected_pdu(const srslte::unique_byte_buffer_t
uint8_t pdcp_sn_len,
srslte::as_security_config_t sec_cfg,
srslte::byte_buffer_pool* pool,
srslte::log* log)
srslte::log_ref log)
{
srslte::pdcp_config_t cfg = {1,
srslte::PDCP_RB_IS_DRB,
@ -162,7 +162,7 @@ std::vector<pdcp_test_event_t> gen_expected_pdus_vector(const srslte::unique_byt
uint8_t pdcp_sn_len,
srslte::as_security_config_t sec_cfg,
srslte::byte_buffer_pool* pool,
srslte::log* log)
srslte::log_ref log)
{
std::vector<pdcp_test_event_t> pdu_vec;
for (uint32_t tx_next : tx_nexts) {

View File

@ -28,7 +28,7 @@ int test_tx_sdu_discard(const pdcp_initial_state& init_state,
srslte::pdcp_discard_timer_t discard_timeout,
bool imediate_notify,
srslte::byte_buffer_pool* pool,
srslte::log* log)
srslte::log_ref log)
{
srslte::pdcp_config_t cfg = {1,
srslte::PDCP_RB_IS_DRB,
@ -82,7 +82,7 @@ int test_tx_sdu_discard(const pdcp_initial_state& init_state,
* TX Test: PDCP Entity with SN LEN = 12 and 18.
* PDCP entity configured with EIA2 and EEA2
*/
int test_tx_discard_all(srslte::byte_buffer_pool* pool, srslte::log* log)
int test_tx_discard_all(srslte::byte_buffer_pool* pool, srslte::log_ref log)
{
/*
@ -103,11 +103,11 @@ int test_tx_discard_all(srslte::byte_buffer_pool* pool, srslte::log* log)
int run_all_tests(srslte::byte_buffer_pool* pool)
{
// Setup log
srslte::log_filter log("PDCP NR Test");
log.set_level(srslte::LOG_LEVEL_DEBUG);
log.set_hex_limit(128);
srslte::log_ref log("PDCP NR Test");
log->set_level(srslte::LOG_LEVEL_DEBUG);
log->set_hex_limit(128);
TESTASSERT(test_tx_discard_all(pool, &log) == 0);
TESTASSERT(test_tx_discard_all(pool, log) == 0);
return 0;
}

View File

@ -30,7 +30,7 @@ int test_rx(std::vector<pdcp_test_event_t> events,
uint32_t n_sdus_exp,
const srslte::unique_byte_buffer_t& sdu_exp,
srslte::byte_buffer_pool* pool,
srslte::log* log)
srslte::log_ref log)
{
@ -70,7 +70,7 @@ int test_rx(std::vector<pdcp_test_event_t> events,
* RX Test: PDCP Entity with SN LEN = 12 and 18.
* PDCP entity configured with EIA2 and EEA2
*/
int test_rx_all(srslte::byte_buffer_pool* pool, srslte::log* log)
int test_rx_all(srslte::byte_buffer_pool* pool, srslte::log_ref log)
{
// Test SDUs
srslte::unique_byte_buffer_t tst_sdu1 = allocate_unique_buffer(*pool); // SDU 1
@ -232,11 +232,11 @@ int test_rx_all(srslte::byte_buffer_pool* pool, srslte::log* log)
int run_all_tests(srslte::byte_buffer_pool* pool)
{
// Setup log
srslte::log_filter log("PDCP NR Test RX");
log.set_level(srslte::LOG_LEVEL_DEBUG);
log.set_hex_limit(128);
srslte::log_ref log("PDCP NR Test RX");
log->set_level(srslte::LOG_LEVEL_DEBUG);
log->set_hex_limit(128);
TESTASSERT(test_rx_all(pool, &log) == 0);
TESTASSERT(test_rx_all(pool, log) == 0);
return 0;
}

View File

@ -30,7 +30,7 @@ int test_tx(uint32_t n_packets,
uint64_t n_pdus_exp,
srslte::unique_byte_buffer_t pdu_exp,
srslte::byte_buffer_pool* pool,
srslte::log* log)
srslte::log_ref log)
{
srslte::pdcp_config_t cfg = {1,
srslte::PDCP_RB_IS_DRB,
@ -66,7 +66,7 @@ int test_tx(uint32_t n_packets,
* TX Test: PDCP Entity with SN LEN = 12 and 18.
* PDCP entity configured with EIA2 and EEA2
*/
int test_tx_all(srslte::byte_buffer_pool* pool, srslte::log* log)
int test_tx_all(srslte::byte_buffer_pool* pool, srslte::log_ref log)
{
uint64_t n_packets;
/*
@ -209,11 +209,11 @@ int test_tx_all(srslte::byte_buffer_pool* pool, srslte::log* log)
int run_all_tests(srslte::byte_buffer_pool* pool)
{
// Setup log
srslte::log_filter log("PDCP NR Test TX");
log.set_level(srslte::LOG_LEVEL_DEBUG);
log.set_hex_limit(128);
srslte::log_ref log("PDCP NR Test TX");
log->set_level(srslte::LOG_LEVEL_DEBUG);
log->set_hex_limit(128);
TESTASSERT(test_tx_all(pool, &log) == 0);
TESTASSERT(test_tx_all(pool, log) == 0);
return 0;
}

View File

@ -84,14 +84,14 @@ public:
log1("RLC_UM_1"),
log2("RLC_UM_2"),
timers(16),
rlc1(&log1, 3, &tester, &tester, &timers),
rlc2(&log2, 3, &tester, &tester, &timers)
rlc1(log1, 3, &tester, &tester, &timers),
rlc2(log2, 3, &tester, &tester, &timers)
{
// setup logging
log1.set_level(srslte::LOG_LEVEL_DEBUG);
log2.set_level(srslte::LOG_LEVEL_DEBUG);
log1.set_hex_limit(-1);
log2.set_hex_limit(-1);
log1->set_level(srslte::LOG_LEVEL_DEBUG);
log2->set_level(srslte::LOG_LEVEL_DEBUG);
log1->set_hex_limit(-1);
log2->set_hex_limit(-1);
// configure RLC entities
rlc_config_t cnfg = rlc_config_t::default_rlc_um_nr_config(6);
@ -105,7 +105,7 @@ public:
tester.set_expected_sdu_len(1);
}
srslte::log_filter log1, log2;
srslte::log_ref log1, log2;
srslte::timer_handler timers;
rlc_um_tester tester;
rlc_um_nr rlc1, rlc2;