|
|
|
@ -36,7 +36,6 @@ namespace srslte {
|
|
|
|
|
#define RLC_AM_WINDOW_SIZE 512
|
|
|
|
|
#define RLC_MAX_SDU_SIZE ((1 << 11) - 1) // Length of LI field is 11bits
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
|
RLC_FI_FIELD_START_AND_END_ALIGNED = 0,
|
|
|
|
|
RLC_FI_FIELD_NOT_END_ALIGNED,
|
|
|
|
@ -89,8 +88,7 @@ typedef enum {
|
|
|
|
|
RLC_DC_FIELD_DATA_PDU,
|
|
|
|
|
RLC_DC_FIELD_N_ITEMS,
|
|
|
|
|
} rlc_dc_field_t;
|
|
|
|
|
static const char rlc_dc_field_text[RLC_DC_FIELD_N_ITEMS][20] = {"Control PDU",
|
|
|
|
|
"Data PDU"};
|
|
|
|
|
static const char rlc_dc_field_text[RLC_DC_FIELD_N_ITEMS][20] = {"Control PDU", "Data PDU"};
|
|
|
|
|
|
|
|
|
|
// UMD PDU Header
|
|
|
|
|
typedef struct {
|
|
|
|
@ -120,7 +118,8 @@ struct rlc_amd_pdu_header_t{
|
|
|
|
|
uint32_t N_li; // Number of length indicators
|
|
|
|
|
uint16_t li[RLC_AM_WINDOW_SIZE]; // Array of length indicators
|
|
|
|
|
|
|
|
|
|
rlc_amd_pdu_header_t(){
|
|
|
|
|
rlc_amd_pdu_header_t()
|
|
|
|
|
{
|
|
|
|
|
dc = RLC_DC_FIELD_CONTROL_PDU;
|
|
|
|
|
rf = 0;
|
|
|
|
|
p = 0;
|
|
|
|
@ -132,10 +131,7 @@ struct rlc_amd_pdu_header_t{
|
|
|
|
|
for (int i = 0; i < RLC_AM_WINDOW_SIZE; i++)
|
|
|
|
|
li[i] = 0;
|
|
|
|
|
}
|
|
|
|
|
rlc_amd_pdu_header_t(const rlc_amd_pdu_header_t& h)
|
|
|
|
|
{
|
|
|
|
|
copy(h);
|
|
|
|
|
}
|
|
|
|
|
rlc_amd_pdu_header_t(const rlc_amd_pdu_header_t& h) { copy(h); }
|
|
|
|
|
rlc_amd_pdu_header_t& operator=(const rlc_amd_pdu_header_t& h)
|
|
|
|
|
{
|
|
|
|
|
copy(h);
|
|
|
|
@ -164,7 +160,13 @@ struct rlc_status_nack_t{
|
|
|
|
|
uint16_t so_start;
|
|
|
|
|
uint16_t so_end;
|
|
|
|
|
|
|
|
|
|
rlc_status_nack_t(){has_so=false; nack_sn=0; so_start=0; so_end=0;}
|
|
|
|
|
rlc_status_nack_t()
|
|
|
|
|
{
|
|
|
|
|
has_so = false;
|
|
|
|
|
nack_sn = 0;
|
|
|
|
|
so_start = 0;
|
|
|
|
|
so_end = 0;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// STATUS PDU
|
|
|
|
@ -173,7 +175,11 @@ struct rlc_status_pdu_t{
|
|
|
|
|
uint32_t N_nack;
|
|
|
|
|
rlc_status_nack_t nacks[RLC_AM_WINDOW_SIZE];
|
|
|
|
|
|
|
|
|
|
rlc_status_pdu_t(){N_nack=0; ack_sn=0;}
|
|
|
|
|
rlc_status_pdu_t()
|
|
|
|
|
{
|
|
|
|
|
N_nack = 0;
|
|
|
|
|
ack_sn = 0;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** RLC AM NR structs */
|
|
|
|
@ -204,7 +210,6 @@ typedef struct {
|
|
|
|
|
class rlc_common
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
// Size of the Uplink buffer in number of PDUs
|
|
|
|
|
const static int RLC_BUFFER_NOF_PDU = 128;
|
|
|
|
|
|
|
|
|
@ -291,5 +296,4 @@ private:
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace srslte
|
|
|
|
|
|
|
|
|
|
#endif // SRSLTE_RLC_COMMON_H
|
|
|
|
|