Added intereface to set PDCP state after reestablishment.

master
Pedro Alvarez 5 years ago
parent 217f16d137
commit 66d4f320e5

@ -387,6 +387,7 @@ public:
virtual bool
get_bearer_status(uint16_t rnti, uint32_t lcid, uint16_t* dlsn, uint16_t* dlhfn, uint16_t* ulsn, uint16_t* ulhfn) = 0;
virtual bool get_state(uint16_t rnti, uint32_t lcid, srslte::pdcp_lte_state_t* state) = 0;
virtual bool set_state(uint16_t rnti, uint32_t lcid, const srslte::pdcp_lte_state_t& state) = 0;
};
// PDCP interface for RLC

@ -57,6 +57,7 @@ public:
void enable_security_timed(uint32_t lcid, srslte_direction_t direction, uint32_t sn);
bool get_bearer_status(uint32_t lcid, uint16_t* dlsn, uint16_t* dlhfn, uint16_t* ulsn, uint16_t* ulhfn);
bool get_state(uint32_t lcid, srslte::pdcp_lte_state_t* state);
bool set_state(uint32_t lcid, const srslte::pdcp_lte_state_t& state);
// RLC interface
void write_pdu(uint32_t lcid, unique_byte_buffer_t sdu);

@ -237,6 +237,15 @@ bool pdcp::get_state(uint32_t lcid, srslte::pdcp_lte_state_t* state)
return true;
}
bool pdcp::set_state(uint32_t lcid, const srslte::pdcp_lte_state_t& state)
{
if (not valid_lcid(lcid)) {
return false;
}
pdcp_array[lcid]->set_state(state);
return true;
}
/*******************************************************************************
RLC interface
*******************************************************************************/

@ -55,6 +55,7 @@ public:
bool get_bearer_status(uint16_t rnti, uint32_t lcid, uint16_t* dlsn, uint16_t* dlhfn, uint16_t* ulsn, uint16_t* ulhfn)
override;
bool get_state(uint16_t rnti, uint32_t lcid, srslte::pdcp_lte_state_t* state);
bool set_state(uint16_t rnti, uint32_t lcid, const srslte::pdcp_lte_state_t& state);
private:
class user_interface_rlc : public srsue::rlc_interface_pdcp

@ -558,7 +558,7 @@ void rrc::ue::send_connection_reconf(srslte::unique_byte_buffer_t pdu)
// If reconf due to reestablishment, recover PDCP state
if (state == RRC_STATE_REESTABLISHMENT_COMPLETE) {
// parent->pdcp->set_state(rnti, 3, old_reest_pdcp_state);
parent->pdcp->set_state(rnti, 3, old_reest_pdcp_state);
}
// Reuse same PDU

@ -138,6 +138,14 @@ bool pdcp::get_state(uint16_t rnti, uint32_t lcid, srslte::pdcp_lte_state_t* sta
return users[rnti].pdcp->get_state(lcid, state);
}
bool pdcp::set_state(uint16_t rnti, uint32_t lcid, const srslte::pdcp_lte_state_t& state)
{
if (users.count(rnti) == 0) {
return false;
}
return users[rnti].pdcp->set_state(lcid, state);
}
void pdcp::write_pdu(uint16_t rnti, uint32_t lcid, srslte::unique_byte_buffer_t sdu)
{
if (users.count(rnti)) {

@ -78,6 +78,7 @@ public:
return true;
}
bool get_state(uint16_t rnti, uint32_t lcid, srslte::pdcp_lte_state_t* state) { return true; }
bool set_state(uint16_t rnti, uint32_t lcid, const srslte::pdcp_lte_state_t& state) { return true; }
};
class s1ap_dummy : public s1ap_interface_rrc

Loading…
Cancel
Save