fix 5g compilation errors

master
Francisco Paisana 5 years ago committed by Francisco Paisana
parent 344eaf49ec
commit 8aa44928e9

@ -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();

@ -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_,

@ -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_),
@ -72,10 +72,8 @@ 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());
}
}
// SDAP/RRC interface
void pdcp_entity_nr::write_sdu(unique_byte_buffer_t sdu, bool blocking)

@ -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_,

@ -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) {

@ -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;
}

@ -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;
}

@ -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;
}

@ -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;

Loading…
Cancel
Save