rlc_am_nr: renamed rlc_am_base to just rlc_am

master
Pedro Alvarez 3 years ago
parent aef87d5366
commit eefedcfccd

@ -41,20 +41,20 @@ bool rlc_am_is_control_pdu(byte_buffer_t* pdu);
* This entity is common between LTE and NR
* and only the TX/RX entities change between them
*******************************************************/
class rlc_am_base : public rlc_common
class rlc_am : public rlc_common
{
protected:
class rlc_am_base_tx;
class rlc_am_base_rx;
public:
rlc_am_base(srslog::basic_logger& logger,
uint32_t lcid_,
srsue::pdcp_interface_rlc* pdcp_,
srsue::rrc_interface_rlc* rrc_,
srsran::timer_handler* timers_,
rlc_am_base_tx* tx_base_,
rlc_am_base_rx* rx_base_) :
rlc_am(srslog::basic_logger& logger,
uint32_t lcid_,
srsue::pdcp_interface_rlc* pdcp_,
srsue::rrc_interface_rlc* rrc_,
srsran::timer_handler* timers_,
rlc_am_base_tx* tx_base_,
rlc_am_base_rx* rx_base_) :
logger(logger), rrc(rrc_), pdcp(pdcp_), timers(timers_), lcid(lcid_), tx_base(tx_base_), rx_base(rx_base_)
{}
@ -165,7 +165,7 @@ protected:
class rlc_am_base_rx
{
public:
explicit rlc_am_base_rx(rlc_am_base* parent_, srslog::basic_logger* logger_) : parent(parent_), logger(logger_) {}
explicit rlc_am_base_rx(rlc_am* parent_, srslog::basic_logger* logger_) : parent(parent_), logger(logger_) {}
virtual bool configure(const rlc_config_t& cfg_) = 0;
virtual void handle_data_pdu(uint8_t* payload, uint32_t nof_bytes) = 0;
@ -178,7 +178,7 @@ protected:
srslog::basic_logger* logger = nullptr;
byte_buffer_pool* pool = nullptr;
rlc_am_base* parent = nullptr;
rlc_am* parent = nullptr;
};
std::unique_ptr<rlc_am_base_tx> tx_base = {};

@ -85,7 +85,7 @@ private:
* RLC AM LTE entity
*
*****************************/
class rlc_am_lte : public rlc_am_base
class rlc_am_lte : public rlc_am
{
public:
rlc_am_lte(srslog::basic_logger& logger,

@ -32,7 +32,7 @@ namespace srsran {
* RLC AM NR entity
*
*****************************/
class rlc_am_nr : public rlc_am_base
class rlc_am_nr : public rlc_am
{
public:
rlc_am_nr(srslog::basic_logger& logger,

@ -30,7 +30,7 @@ bool rlc_am_is_control_pdu(byte_buffer_t* pdu)
* This entity is common between LTE and NR
* and only the TX/RX entities change between them
*******************************************************/
bool rlc_am_base::configure(const rlc_config_t& cfg_)
bool rlc_am::configure(const rlc_config_t& cfg_)
{
// determine bearer name and configure Rx/Tx objects
rb_name = rrc->get_rb_name(lcid);
@ -60,14 +60,14 @@ bool rlc_am_base::configure(const rlc_config_t& cfg_)
return true;
}
void rlc_am_base::stop()
void rlc_am::stop()
{
logger.debug("Stopped bearer %s", rb_name.c_str());
tx_base->stop();
rx_base->stop();
}
void rlc_am_base::reestablish()
void rlc_am::reestablish()
{
logger.debug("Reestablished bearer %s", rb_name.c_str());
tx_base->reestablish(); // calls stop and enables tx again
@ -77,7 +77,7 @@ void rlc_am_base::reestablish()
/****************************************************************************
* PDCP interface
***************************************************************************/
void rlc_am_base::write_sdu(unique_byte_buffer_t sdu)
void rlc_am::write_sdu(unique_byte_buffer_t sdu)
{
if (tx_base->write_sdu(std::move(sdu)) == SRSRAN_SUCCESS) {
std::lock_guard<std::mutex> lock(metrics_mutex);
@ -85,7 +85,7 @@ void rlc_am_base::write_sdu(unique_byte_buffer_t sdu)
}
}
void rlc_am_base::discard_sdu(uint32_t discard_sn)
void rlc_am::discard_sdu(uint32_t discard_sn)
{
tx_base->discard_sdu(discard_sn);
@ -93,7 +93,7 @@ void rlc_am_base::discard_sdu(uint32_t discard_sn)
metrics.num_lost_sdus++;
}
bool rlc_am_base::sdu_queue_is_full()
bool rlc_am::sdu_queue_is_full()
{
return tx_base->sdu_queue_is_full();
}
@ -101,23 +101,23 @@ bool rlc_am_base::sdu_queue_is_full()
/****************************************************************************
* MAC interface
***************************************************************************/
bool rlc_am_base::has_data()
bool rlc_am::has_data()
{
return tx_base->has_data();
}
uint32_t rlc_am_base::get_buffer_state()
uint32_t rlc_am::get_buffer_state()
{
return tx_base->get_buffer_state();
}
void rlc_am_base::get_buffer_state(uint32_t& n_bytes_newtx, uint32_t& n_bytes_prio)
void rlc_am::get_buffer_state(uint32_t& n_bytes_newtx, uint32_t& n_bytes_prio)
{
tx_base->get_buffer_state(n_bytes_newtx, n_bytes_prio);
return;
}
uint32_t rlc_am_base::read_pdu(uint8_t* payload, uint32_t nof_bytes)
uint32_t rlc_am::read_pdu(uint8_t* payload, uint32_t nof_bytes)
{
uint32_t read_bytes = tx_base->read_pdu(payload, nof_bytes);
@ -127,7 +127,7 @@ uint32_t rlc_am_base::read_pdu(uint8_t* payload, uint32_t nof_bytes)
return read_bytes;
}
void rlc_am_base::write_pdu(uint8_t* payload, uint32_t nof_bytes)
void rlc_am::write_pdu(uint8_t* payload, uint32_t nof_bytes)
{
rx_base->write_pdu(payload, nof_bytes);
@ -139,7 +139,7 @@ void rlc_am_base::write_pdu(uint8_t* payload, uint32_t nof_bytes)
/****************************************************************************
* Metrics
***************************************************************************/
rlc_bearer_metrics_t rlc_am_base::get_metrics()
rlc_bearer_metrics_t rlc_am::get_metrics()
{
// update values that aren't calculated on the fly
uint32_t latency = rx_base->get_sdu_rx_latency_ms();
@ -151,7 +151,7 @@ rlc_bearer_metrics_t rlc_am_base::get_metrics()
return metrics;
}
void rlc_am_base::reset_metrics()
void rlc_am::reset_metrics()
{
std::lock_guard<std::mutex> lock(metrics_mutex);
metrics = {};
@ -160,7 +160,7 @@ void rlc_am_base::reset_metrics()
/****************************************************************************
* BSR callback
***************************************************************************/
void rlc_am_base::set_bsr_callback(bsr_callback_t callback)
void rlc_am::set_bsr_callback(bsr_callback_t callback)
{
tx_base->set_bsr_callback(callback);
}
@ -170,7 +170,7 @@ void rlc_am_base::set_bsr_callback(bsr_callback_t callback)
* This class is used for common code between the
* LTE and NR TX entitites
*******************************************************/
int rlc_am_base::rlc_am_base_tx::write_sdu(unique_byte_buffer_t sdu)
int rlc_am::rlc_am_base_tx::write_sdu(unique_byte_buffer_t sdu)
{
std::lock_guard<std::mutex> lock(mutex);
@ -207,7 +207,7 @@ int rlc_am_base::rlc_am_base_tx::write_sdu(unique_byte_buffer_t sdu)
return SRSRAN_SUCCESS;
}
void rlc_am_base::rlc_am_base_tx::set_bsr_callback(bsr_callback_t callback)
void rlc_am::rlc_am_base_tx::set_bsr_callback(bsr_callback_t callback)
{
bsr_callback = callback;
}
@ -217,7 +217,7 @@ void rlc_am_base::rlc_am_base_tx::set_bsr_callback(bsr_callback_t callback)
* This class is used for common code between the
* LTE and NR TX entitites
*******************************************************/
void rlc_am_base::rlc_am_base_rx::write_pdu(uint8_t* payload, const uint32_t nof_bytes)
void rlc_am::rlc_am_base_rx::write_pdu(uint8_t* payload, const uint32_t nof_bytes)
{
if (nof_bytes < 1) {
return;

@ -37,13 +37,7 @@ rlc_am_lte::rlc_am_lte(srslog::basic_logger& logger,
srsue::pdcp_interface_rlc* pdcp_,
srsue::rrc_interface_rlc* rrc_,
srsran::timer_handler* timers_) :
rlc_am_base(logger,
lcid_,
pdcp_,
rrc_,
timers_,
new rlc_am_lte::rlc_am_lte_tx(this),
new rlc_am_lte::rlc_am_lte_rx(this))
rlc_am(logger, lcid_, pdcp_, rrc_, timers_, new rlc_am_lte::rlc_am_lte_tx(this), new rlc_am_lte::rlc_am_lte_rx(this))
{}
/****************************************************************************
* Tx subclass implementation

@ -27,7 +27,7 @@ rlc_am_nr::rlc_am_nr(srslog::basic_logger& logger,
srsue::pdcp_interface_rlc* pdcp_,
srsue::rrc_interface_rlc* rrc_,
srsran::timer_handler* timers_) :
rlc_am_base(logger, lcid_, pdcp_, rrc_, timers_, new rlc_am_nr::rlc_am_nr_tx(this), new rlc_am_nr::rlc_am_nr_rx(this))
rlc_am(logger, lcid_, pdcp_, rrc_, timers_, new rlc_am_nr::rlc_am_nr_tx(this), new rlc_am_nr::rlc_am_nr_rx(this))
{}
/***************************************************************************

Loading…
Cancel
Save