mirror of https://github.com/PentHertz/srsLTE.git
Starting to implement the receive function of PDCP NR.
This commit is contained in:
parent
d7a2721bb0
commit
8e1b9b9f5b
|
@ -77,19 +77,14 @@ private:
|
|||
uint16_t sn_len_bytes = 0;
|
||||
|
||||
// State variables: 3GPP TS 38.323 v15.2.0, section 7.1
|
||||
uint32_t tx_next = 0;
|
||||
uint32_t rx_next = 0;
|
||||
uint32_t rx_deliv = 0;
|
||||
uint32_t rx_reord = 0;
|
||||
uint32_t tx_next = 0; // COUNT value of next SDU to be transmitted.
|
||||
uint32_t rx_next = 0; // COUNT value of next SDU expected to be received.
|
||||
uint32_t rx_deliv = 0; // COUNT value of first SDU not delivered to upper layers, but still waited for.
|
||||
uint32_t rx_reord = 0; // COUNT value following the COUNT value of PDCP Data PDU which triggered t-Reordering.
|
||||
|
||||
// Constants: 3GPP TS 38.323 v15.2.0, section 7.2
|
||||
uint32_t window_size = 0;
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Pack/Unpack helper functions
|
||||
* Ref: 3GPP TS 38.323 v15.2.0
|
||||
***************************************************************************/
|
||||
|
||||
} // namespace srslte
|
||||
#endif // SRSLTE_PDCP_ENTITY_NR_H
|
||||
|
|
|
@ -115,11 +115,26 @@ void pdcp_entity_nr::write_pdu(unique_byte_buffer_t pdu)
|
|||
cipher_decript(pdu);
|
||||
|
||||
// Check valid rcvd_count
|
||||
if (rcvd_count < rx_deliv /*|| received_before (TODO)*/) {
|
||||
if (rcvd_count < rx_deliv /*|| check_received_before() TODO*/) {
|
||||
return; // Invalid count, drop.
|
||||
}
|
||||
|
||||
//
|
||||
if(rcvd_count >= rx_next)
|
||||
// Store PDU in reception buffer
|
||||
// TODO
|
||||
|
||||
// Update RX_NEXT
|
||||
if(rcvd_count >= rx_next){
|
||||
rx_next = rcvd_count + 1;
|
||||
}
|
||||
|
||||
// Deliver to upper layers (TODO support in order delivery)
|
||||
if (is_control()) {
|
||||
rrc->write_pdu(pdu);
|
||||
} else {
|
||||
gw->write_pdu(pdu);
|
||||
}
|
||||
|
||||
// Not clear how to update RX_DELIV without reception buffer (TODO)
|
||||
|
||||
// TODO handle reordering timers
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue