diff --git a/lib/include/srslte/upper/pdcp_entity_base.h b/lib/include/srslte/upper/pdcp_entity_base.h index 0476306b7..cdcb742fd 100644 --- a/lib/include/srslte/upper/pdcp_entity_base.h +++ b/lib/include/srslte/upper/pdcp_entity_base.h @@ -90,7 +90,8 @@ public: uint32_t COUNT(uint32_t hfn, uint32_t sn); protected: - srslte::log* log = nullptr; + srslte::log* log = nullptr; + srslte::timers* timers = nullptr; bool active = false; uint32_t lcid = 0; diff --git a/lib/include/srslte/upper/pdcp_entity_nr.h b/lib/include/srslte/upper/pdcp_entity_nr.h index d5e783f7b..743c8da4b 100644 --- a/lib/include/srslte/upper/pdcp_entity_nr.h +++ b/lib/include/srslte/upper/pdcp_entity_nr.h @@ -44,6 +44,7 @@ public: void init(srsue::rlc_interface_pdcp* rlc_, srsue::rrc_interface_pdcp* rrc_, srsue::gw_interface_pdcp* gw_, + srslte::timers* timers_, srslte::log* log_, uint32_t lcid_, pdcp_config_t cfg_); diff --git a/lib/src/upper/pdcp_entity_nr.cc b/lib/src/upper/pdcp_entity_nr.cc index d14a8dd94..41e14a2bd 100644 --- a/lib/src/upper/pdcp_entity_nr.cc +++ b/lib/src/upper/pdcp_entity_nr.cc @@ -32,6 +32,7 @@ pdcp_entity_nr::~pdcp_entity_nr() {} void pdcp_entity_nr::init(srsue::rlc_interface_pdcp* rlc_, srsue::rrc_interface_pdcp* rrc_, srsue::gw_interface_pdcp* gw_, + srslte::timers* timers_, srslte::log* log_, uint32_t lcid_, pdcp_config_t cfg_) @@ -39,6 +40,7 @@ void pdcp_entity_nr::init(srsue::rlc_interface_pdcp* rlc_, rlc = rlc_; rrc = rrc_; gw = gw_; + timers = timers_; log = log_; lcid = lcid_; cfg = cfg_; diff --git a/lib/test/upper/pdcp_nr_test.cc b/lib/test/upper/pdcp_nr_test.cc index 6db148604..45d43394e 100644 --- a/lib/test/upper/pdcp_nr_test.cc +++ b/lib/test/upper/pdcp_nr_test.cc @@ -146,8 +146,9 @@ int test_tx(uint32_t n_packets, rlc_dummy rlc(log); rrc_dummy rrc(log); gw_dummy gw(log); + srslte::timers timers(64); - pdcp.init(&rlc, &rrc, &gw, log, 0, cfg); + pdcp.init(&rlc, &rrc, &gw, &timers, log, 0, cfg); pdcp.config_security( k_enc, k_int, k_enc, k_int, srslte::CIPHERING_ALGORITHM_ID_128_EEA2, srslte::INTEGRITY_ALGORITHM_ID_128_EIA2); pdcp.enable_integrity(); @@ -269,21 +270,23 @@ int test_rx_in_sequence(uint64_t n_packets, uint8_t pdcp_sn_len, srslte::byte_bu srslte::pdcp_config_t cfg_rx = { 1, srslte::PDCP_RB_IS_DRB, srslte::SECURITY_DIRECTION_DOWNLINK, srslte::SECURITY_DIRECTION_UPLINK, pdcp_sn_len}; - rlc_dummy rlc_tx(log); - rrc_dummy rrc_tx(log); - gw_dummy gw_tx(log); + rlc_dummy rlc_tx(log); + rrc_dummy rrc_tx(log); + gw_dummy gw_tx(log); + srslte::timers timers_tx(64); - rlc_dummy rlc_rx(log); - rrc_dummy rrc_rx(log); - gw_dummy gw_rx(log); + rlc_dummy rlc_rx(log); + rrc_dummy rrc_rx(log); + gw_dummy gw_rx(log); + srslte::timers timers_rx(64); - pdcp_tx.init(&rlc_tx, &rrc_tx, &gw_tx, log, 0, cfg_tx); + pdcp_tx.init(&rlc_tx, &rrc_tx, &gw_tx, &timers_tx, log, 0, cfg_tx); pdcp_tx.config_security( k_enc, k_int, k_enc, k_int, srslte::CIPHERING_ALGORITHM_ID_128_EEA2, srslte::INTEGRITY_ALGORITHM_ID_128_EIA2); pdcp_tx.enable_integrity(); pdcp_tx.enable_encryption(); - pdcp_rx.init(&rlc_rx, &rrc_rx, &gw_rx, log, 0, cfg_rx); + pdcp_rx.init(&rlc_rx, &rrc_rx, &gw_rx, &timers_rx, log, 0, cfg_rx); pdcp_rx.config_security( k_enc, k_int, k_enc, k_int, srslte::CIPHERING_ALGORITHM_ID_128_EEA2, srslte::INTEGRITY_ALGORITHM_ID_128_EIA2); pdcp_rx.enable_integrity();