add RLC suspend/resume to eNB interface

master
Andre Puschmann 5 years ago
parent 369592544c
commit d3cb2eac83

@ -194,6 +194,8 @@ public:
virtual void add_bearer_mrb(uint16_t rnti, uint32_t lcid) = 0; virtual void add_bearer_mrb(uint16_t rnti, uint32_t lcid) = 0;
virtual void write_sdu(uint16_t rnti, uint32_t lcid, srslte::unique_byte_buffer_t sdu) = 0; virtual void write_sdu(uint16_t rnti, uint32_t lcid, srslte::unique_byte_buffer_t sdu) = 0;
virtual bool has_bearer(uint16_t rnti, uint32_t lcid) = 0; virtual bool has_bearer(uint16_t rnti, uint32_t lcid) = 0;
virtual bool suspend_bearer(uint16_t rnti, uint32_t lcid) = 0;
virtual bool resume_bearer(uint16_t rnti, uint32_t lcid) = 0;
}; };
// PDCP interface for GTPU // PDCP interface for GTPU

@ -53,6 +53,8 @@ public:
void add_bearer(uint16_t rnti, uint32_t lcid, srslte::rlc_config_t cnfg); void add_bearer(uint16_t rnti, uint32_t lcid, srslte::rlc_config_t cnfg);
void add_bearer_mrb(uint16_t rnti, uint32_t lcid); void add_bearer_mrb(uint16_t rnti, uint32_t lcid);
bool has_bearer(uint16_t rnti, uint32_t lcid); bool has_bearer(uint16_t rnti, uint32_t lcid);
bool suspend_bearer(uint16_t rnti, uint32_t lcid);
bool resume_bearer(uint16_t rnti, uint32_t lcid);
// rlc_interface_pdcp // rlc_interface_pdcp
void write_sdu(uint16_t rnti, uint32_t lcid, srslte::unique_byte_buffer_t sdu); void write_sdu(uint16_t rnti, uint32_t lcid, srslte::unique_byte_buffer_t sdu);

@ -121,6 +121,30 @@ bool rlc::has_bearer(uint16_t rnti, uint32_t lcid)
return result; return result;
} }
bool rlc::suspend_bearer(uint16_t rnti, uint32_t lcid)
{
pthread_rwlock_rdlock(&rwlock);
bool result = false;
if (users.count(rnti)) {
users[rnti].rlc->suspend_bearer(lcid);
result = true;
}
pthread_rwlock_unlock(&rwlock);
return result;
}
bool rlc::resume_bearer(uint16_t rnti, uint32_t lcid)
{
pthread_rwlock_rdlock(&rwlock);
bool result = false;
if (users.count(rnti)) {
users[rnti].rlc->resume_bearer(lcid);
result = true;
}
pthread_rwlock_unlock(&rwlock);
return result;
}
void rlc::read_pdu_pcch(uint8_t* payload, uint32_t buffer_size) void rlc::read_pdu_pcch(uint8_t* payload, uint32_t buffer_size)
{ {
rrc->read_pdu_pcch(payload, buffer_size); rrc->read_pdu_pcch(payload, buffer_size);

Loading…
Cancel
Save