mirror of https://github.com/pvnis/srsRAN_4G.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
1.9 KiB
C
80 lines
1.9 KiB
C
4 years ago
|
/**
|
||
8 years ago
|
*
|
||
4 years ago
|
* \section COPYRIGHT
|
||
8 years ago
|
*
|
||
4 years ago
|
* Copyright 2013-2021 Software Radio Systems Limited
|
||
8 years ago
|
*
|
||
4 years ago
|
* By using this file, you agree to the terms and conditions set
|
||
|
* forth in the LICENSE file which can be found at the top level of
|
||
|
* the distribution.
|
||
8 years ago
|
*
|
||
|
*/
|
||
|
|
||
4 years ago
|
#ifndef SRSRAN_RLC_TM_H
|
||
|
#define SRSRAN_RLC_TM_H
|
||
8 years ago
|
|
||
4 years ago
|
#include "srsran/common/buffer_pool.h"
|
||
|
#include "srsran/common/common.h"
|
||
|
#include "srsran/upper/byte_buffer_queue.h"
|
||
|
#include "srsran/upper/rlc_common.h"
|
||
8 years ago
|
|
||
4 years ago
|
namespace srsue {
|
||
|
|
||
|
class pdcp_interface_rlc;
|
||
4 years ago
|
class rrc_interface_rlc;
|
||
4 years ago
|
|
||
4 years ago
|
} // namespace srsue
|
||
4 years ago
|
|
||
4 years ago
|
namespace srsran {
|
||
8 years ago
|
|
||
5 years ago
|
class rlc_tm final : public rlc_common
|
||
8 years ago
|
{
|
||
|
public:
|
||
4 years ago
|
rlc_tm(srslog::basic_logger& logger,
|
||
|
uint32_t lcid_,
|
||
|
srsue::pdcp_interface_rlc* pdcp_,
|
||
|
srsue::rrc_interface_rlc* rrc_);
|
||
5 years ago
|
~rlc_tm() override;
|
||
5 years ago
|
bool configure(const rlc_config_t& cnfg) override;
|
||
5 years ago
|
void stop() override;
|
||
|
void reestablish() override;
|
||
|
void empty_queue() override;
|
||
8 years ago
|
|
||
5 years ago
|
rlc_mode_t get_mode() override;
|
||
|
uint32_t get_bearer() override;
|
||
8 years ago
|
|
||
5 years ago
|
rlc_bearer_metrics_t get_metrics() override;
|
||
|
void reset_metrics() override;
|
||
7 years ago
|
|
||
8 years ago
|
// PDCP interface
|
||
5 years ago
|
void write_sdu(unique_byte_buffer_t sdu) override;
|
||
5 years ago
|
void discard_sdu(uint32_t discard_sn) override;
|
||
5 years ago
|
bool sdu_queue_is_full() override;
|
||
8 years ago
|
|
||
|
// MAC interface
|
||
5 years ago
|
bool has_data() override;
|
||
|
uint32_t get_buffer_state() override;
|
||
|
int read_pdu(uint8_t* payload, uint32_t nof_bytes) override;
|
||
|
void write_pdu(uint8_t* payload, uint32_t nof_bytes) override;
|
||
8 years ago
|
|
||
5 years ago
|
void set_bsr_callback(bsr_callback_t callback) override {}
|
||
|
|
||
8 years ago
|
private:
|
||
6 years ago
|
byte_buffer_pool* pool = nullptr;
|
||
4 years ago
|
srslog::basic_logger& logger;
|
||
6 years ago
|
uint32_t lcid = 0;
|
||
|
srsue::pdcp_interface_rlc* pdcp = nullptr;
|
||
|
srsue::rrc_interface_rlc* rrc = nullptr;
|
||
8 years ago
|
|
||
6 years ago
|
bool tx_enabled = true;
|
||
8 years ago
|
|
||
5 years ago
|
rlc_bearer_metrics_t metrics = {};
|
||
7 years ago
|
|
||
8 years ago
|
// Thread-safe queues for MAC messages
|
||
5 years ago
|
byte_buffer_queue ul_queue;
|
||
8 years ago
|
};
|
||
|
|
||
4 years ago
|
} // namespace srsran
|
||
8 years ago
|
|
||
4 years ago
|
#endif // SRSRAN_RLC_TM_H
|