Add PDCP per-bearer reestablish

master
Ismael Gomez 6 years ago committed by Xavier Arteaga
parent ade720e032
commit 14b526f2aa

@ -239,6 +239,7 @@ class pdcp_interface_rrc
{ {
public: public:
virtual void reestablish() = 0; virtual void reestablish() = 0;
virtual void reestablish(uint32_t lcid) = 0;
virtual void reset() = 0; virtual void reset() = 0;
virtual void write_sdu(uint32_t lcid, srslte::unique_byte_buffer_t sdu, bool blocking = true) = 0; virtual void write_sdu(uint32_t lcid, srslte::unique_byte_buffer_t sdu, bool blocking = true) = 0;
virtual void add_bearer(uint32_t lcid, srslte::srslte_pdcp_config_t cnfg = srslte::srslte_pdcp_config_t()) = 0; virtual void add_bearer(uint32_t lcid, srslte::srslte_pdcp_config_t cnfg = srslte::srslte_pdcp_config_t()) = 0;

@ -50,6 +50,7 @@ public:
// RRC interface // RRC interface
void reestablish(); void reestablish();
void reestablish(uint32_t lcid);
void reset(); void reset();
void write_sdu(uint32_t lcid, unique_byte_buffer_t sdu, bool blocking = true); void write_sdu(uint32_t lcid, unique_byte_buffer_t sdu, bool blocking = true);
void write_sdu_mch(uint32_t lcid, unique_byte_buffer_t sdu); void write_sdu_mch(uint32_t lcid, unique_byte_buffer_t sdu);

@ -88,6 +88,15 @@ void pdcp::reestablish() {
pthread_rwlock_unlock(&rwlock); pthread_rwlock_unlock(&rwlock);
} }
void pdcp::reestablish(uint32_t lcid)
{
pthread_rwlock_rdlock(&rwlock);
if (valid_lcid(lcid)) {
pdcp_array.at(lcid)->reestablish();
}
pthread_rwlock_unlock(&rwlock);
}
void pdcp::reset() void pdcp::reset()
{ {
// destroy all bearers // destroy all bearers

Loading…
Cancel
Save