move ue rlc interfaces to separate interfaces header file

master
Francisco 4 years ago committed by Francisco Paisana
parent a988351f46
commit b8bd869d0f

@ -190,69 +190,6 @@ public:
virtual bool is_config_pending() = 0;
};
// RLC interface for RRC
class rlc_interface_rrc
{
public:
virtual void reset() = 0;
virtual void reestablish() = 0;
virtual void reestablish(uint32_t lcid) = 0;
virtual void add_bearer(uint32_t lcid, const srslte::rlc_config_t& cnfg) = 0;
virtual void add_bearer_mrb(uint32_t lcid) = 0;
virtual void del_bearer(uint32_t lcid) = 0;
virtual void suspend_bearer(uint32_t lcid) = 0;
virtual void resume_bearer(uint32_t lcid) = 0;
virtual void change_lcid(uint32_t old_lcid, uint32_t new_lcid) = 0;
virtual bool has_bearer(uint32_t lcid) = 0;
virtual bool has_data(const uint32_t lcid) = 0;
virtual bool is_suspended(const uint32_t lcid) = 0;
virtual void write_sdu(uint32_t lcid, srslte::unique_byte_buffer_t sdu) = 0;
};
// RLC interface for PDCP
class rlc_interface_pdcp
{
public:
///< PDCP calls RLC to push an RLC SDU. SDU gets placed into the buffer
///< MAC pulls RLC PDUs according to TB size
virtual void write_sdu(uint32_t lcid, srslte::unique_byte_buffer_t sdu) = 0;
///< Indicate RLC that a certain SN can be discarded
virtual void discard_sdu(uint32_t lcid, uint32_t discard_sn) = 0;
///< Helper to query RLC mode
virtual bool rb_is_um(uint32_t lcid) = 0;
///< Allow PDCP to query SDU queue status
virtual bool sdu_queue_is_full(uint32_t lcid) = 0;
};
// RLC interface for MAC
class rlc_interface_mac : public srslte::read_pdu_interface
{
public:
/* MAC calls has_data() to query whether a logical channel has data to transmit (without
* knowing how much. This function should return quickly. */
virtual bool has_data_locked(const uint32_t lcid) = 0;
/* MAC calls RLC to get the buffer state for a logical channel. */
virtual uint32_t get_buffer_state(const uint32_t lcid) = 0;
const static int MAX_PDU_SEGMENTS = 20;
/* MAC calls RLC to get RLC segment of nof_bytes length.
* Segmentation happens in this function. RLC PDU is stored in payload. */
virtual int read_pdu(uint32_t lcid, uint8_t* payload, uint32_t nof_bytes) = 0;
/* MAC calls RLC to push an RLC PDU. This function is called from an independent MAC thread.
* PDU gets placed into the buffer and higher layer thread gets notified. */
virtual void write_pdu(uint32_t lcid, uint8_t* payload, uint32_t nof_bytes) = 0;
virtual void write_pdu_bcch_bch(srslte::unique_byte_buffer_t payload) = 0;
virtual void write_pdu_bcch_dlsch(uint8_t* payload, uint32_t nof_bytes) = 0;
virtual void write_pdu_pcch(srslte::unique_byte_buffer_t payload) = 0;
virtual void write_pdu_mch(uint32_t lcid, uint8_t* payload, uint32_t nof_bytes) = 0;
};
/** MAC interface
*
*/

@ -0,0 +1,83 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* 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.
*
*/
#ifndef SRSLTE_UE_RLC_INTERFACES_H
#define SRSLTE_UE_RLC_INTERFACES_H
#include "srslte/common/interfaces_common.h"
#include "srslte/interfaces/rlc_interface_types.h"
namespace srsue {
class rlc_interface_rrc
{
public:
virtual void reset() = 0;
virtual void reestablish() = 0;
virtual void reestablish(uint32_t lcid) = 0;
virtual void add_bearer(uint32_t lcid, const srslte::rlc_config_t& cnfg) = 0;
virtual void add_bearer_mrb(uint32_t lcid) = 0;
virtual void del_bearer(uint32_t lcid) = 0;
virtual void suspend_bearer(uint32_t lcid) = 0;
virtual void resume_bearer(uint32_t lcid) = 0;
virtual void change_lcid(uint32_t old_lcid, uint32_t new_lcid) = 0;
virtual bool has_bearer(uint32_t lcid) = 0;
virtual bool has_data(const uint32_t lcid) = 0;
virtual bool is_suspended(const uint32_t lcid) = 0;
virtual void write_sdu(uint32_t lcid, srslte::unique_byte_buffer_t sdu) = 0;
};
class rlc_interface_pdcp
{
public:
///< PDCP calls RLC to push an RLC SDU. SDU gets placed into the buffer
///< MAC pulls RLC PDUs according to TB size
virtual void write_sdu(uint32_t lcid, srslte::unique_byte_buffer_t sdu) = 0;
///< Indicate RLC that a certain SN can be discarded
virtual void discard_sdu(uint32_t lcid, uint32_t discard_sn) = 0;
///< Helper to query RLC mode
virtual bool rb_is_um(uint32_t lcid) = 0;
///< Allow PDCP to query SDU queue status
virtual bool sdu_queue_is_full(uint32_t lcid) = 0;
};
class rlc_interface_mac : public srslte::read_pdu_interface
{
public:
/* MAC calls has_data() to query whether a logical channel has data to transmit (without
* knowing how much. This function should return quickly. */
virtual bool has_data_locked(const uint32_t lcid) = 0;
/* MAC calls RLC to get the buffer state for a logical channel. */
virtual uint32_t get_buffer_state(const uint32_t lcid) = 0;
const static int MAX_PDU_SEGMENTS = 20;
/* MAC calls RLC to get RLC segment of nof_bytes length.
* Segmentation happens in this function. RLC PDU is stored in payload. */
virtual int read_pdu(uint32_t lcid, uint8_t* payload, uint32_t nof_bytes) = 0;
/* MAC calls RLC to push an RLC PDU. This function is called from an independent MAC thread.
* PDU gets placed into the buffer and higher layer thread gets notified. */
virtual void write_pdu(uint32_t lcid, uint8_t* payload, uint32_t nof_bytes) = 0;
virtual void write_pdu_bcch_bch(srslte::unique_byte_buffer_t payload) = 0;
virtual void write_pdu_bcch_dlsch(uint8_t* payload, uint32_t nof_bytes) = 0;
virtual void write_pdu_pcch(srslte::unique_byte_buffer_t payload) = 0;
virtual void write_pdu_mch(uint32_t lcid, uint8_t* payload, uint32_t nof_bytes) = 0;
};
} // namespace srsue
#endif // SRSLTE_UE_RLC_INTERFACES_H

@ -15,6 +15,7 @@
#include "srslte/common/task_scheduler.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/interfaces/ue_rlc_interfaces.h"
namespace srsue {

@ -24,8 +24,9 @@
namespace srsue {
class gw_interface_pdcp;
class rlc_interface_pdcp;
}
} // namespace srsue
namespace srslte {

@ -23,6 +23,7 @@
#include "srslte/common/threads.h"
#include "srslte/interfaces/ue_gw_interfaces.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/interfaces/ue_rlc_interfaces.h"
#include <map>
namespace srslte {

@ -18,6 +18,7 @@
#include "srslte/common/log.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/interfaces/ue_pdcp_interfaces.h"
#include "srslte/interfaces/ue_rlc_interfaces.h"
#include "srslte/upper/rlc_common.h"
#include "srslte/upper/rlc_metrics.h"

@ -14,6 +14,7 @@
#include "srslte/common/int_helpers.h"
#include "srslte/common/security.h"
#include "srslte/interfaces/ue_gw_interfaces.h"
#include "srslte/interfaces/ue_rlc_interfaces.h"
#include <bitset>
namespace srslte {

@ -20,6 +20,7 @@
#include "srslte/interfaces/pdcp_interface_types.h"
#include "srslte/interfaces/ue_gw_interfaces.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/interfaces/ue_rlc_interfaces.h"
#include <iostream>
int compare_two_packets(const srslte::unique_byte_buffer_t& msg1, const srslte::unique_byte_buffer_t& msg2)

@ -14,6 +14,7 @@
#include "srslte/interfaces/enb_metrics_interface.h"
#include "srslte/interfaces/enb_pdcp_interfaces.h"
#include "srslte/interfaces/ue_gw_interfaces.h"
#include "srslte/interfaces/ue_rlc_interfaces.h"
#include "srslte/srslog/srslog.h"
#include "srslte/upper/pdcp.h"
#include <map>

@ -15,6 +15,7 @@
#include "srslte/common/logger.h"
#include "srslte/interfaces/gnb_interfaces.h"
#include "srslte/interfaces/ue_gw_interfaces.h"
#include "srslte/interfaces/ue_rlc_interfaces.h"
#include "srslte/upper/pdcp.h"
#include <map>

@ -16,6 +16,7 @@
#include "srslte/common/log.h"
#include "srslte/common/timers.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/interfaces/ue_rlc_interfaces.h"
#include "srslte/mac/pdu.h"
#include "srslte/mac/pdu_queue.h"
#include "srslte/srslog/srslog.h"
@ -24,6 +25,8 @@
namespace srsue {
class rlc_interface_mac;
class mac_interface_demux
{
public:

@ -26,6 +26,8 @@
namespace srsue {
class rlc_interface_mac;
// BSR interface for MUX
class bsr_interface_mux
{

@ -19,6 +19,7 @@
#include "srslte/common/mac_pcap.h"
#include "srslte/interfaces/mac_interface_types.h"
#include "srslte/interfaces/ue_nr_interfaces.h"
#include "srslte/interfaces/ue_rlc_interfaces.h"
#include "srslte/mac/mac_sch_pdu_nr.h"
#include "srslte/srslog/srslog.h"
#include "srsue/hdr/stack/mac_nr/mux_nr.h"
@ -26,6 +27,8 @@
namespace srsue {
class rlc_interface_mac;
struct mac_nr_args_t {
srsue::pcap_args_t pcap;
};
@ -73,7 +76,7 @@ public:
/// procedure ra nr interface
uint64_t get_contention_id();
uint16_t get_c_rnti();
void set_c_rnti(uint64_t c_rnti_);
void set_c_rnti(uint64_t c_rnti_);
void msg3_flush() { mux.msg3_flush(); }
bool msg3_is_transmitted() { return mux.msg3_is_transmitted(); }
@ -132,8 +135,8 @@ private:
/// Tx buffer
srslte::mac_sch_pdu_nr tx_pdu;
srslte::unique_byte_buffer_t tx_buffer = nullptr;
srslte::unique_byte_buffer_t rlc_buffer = nullptr;
srslte::unique_byte_buffer_t tx_buffer = nullptr;
srslte::unique_byte_buffer_t rlc_buffer = nullptr;
srslte_softbuffer_tx_t softbuffer_tx = {}; /// UL HARQ (temporal)
srslte::task_multiqueue::queue_handle stack_task_dispatch_queue;

@ -61,6 +61,7 @@ class phy_controller;
class usim_interface_rrc;
class gw_interface_rrc;
class pdcp_interface_rrc;
class rlc_interface_rrc;
class rrc : public rrc_interface_nas,
public rrc_interface_phy_lte,

@ -26,6 +26,7 @@ namespace srsue {
class usim_interface_rrc_nr;
class pdcp_interface_rrc;
class rlc_interface_rrc;
// Expert arguments to create GW without proper RRC
struct core_less_args_t {

@ -11,6 +11,7 @@
*/
#include "srsue/hdr/stack/mac/proc_bsr.h"
#include "srslte/interfaces/ue_rlc_interfaces.h"
#include "srsue/hdr/stack/mac/mux.h"
namespace srsue {

@ -16,6 +16,7 @@
#include "srslte/common/security.h"
#include "srslte/interfaces/ue_gw_interfaces.h"
#include "srslte/interfaces/ue_pdcp_interfaces.h"
#include "srslte/interfaces/ue_rlc_interfaces.h"
#include "srslte/interfaces/ue_usim_interfaces.h"
#include "srsue/hdr/stack/rrc/phy_controller.h"
#include "srsue/hdr/stack/rrc/rrc_meas.h"

@ -13,6 +13,7 @@
#include "srsue/hdr/stack/rrc/rrc_nr.h"
#include "srslte/common/security.h"
#include "srslte/interfaces/ue_pdcp_interfaces.h"
#include "srslte/interfaces/ue_rlc_interfaces.h"
#include "srsue/hdr/stack/upper/usim.h"
#define Error(fmt, ...) rrc_ptr->log_h->error("Proc \"%s\" - " fmt, name(), ##__VA_ARGS__)

@ -15,6 +15,7 @@
#include "srslte/common/standard_streams.h"
#include "srslte/common/tti_point.h"
#include "srslte/interfaces/ue_pdcp_interfaces.h"
#include "srslte/interfaces/ue_rlc_interfaces.h"
#include "srslte/interfaces/ue_usim_interfaces.h"
#include "srsue/hdr/stack/rrc/rrc_meas.h"
#include <inttypes.h> // for printing uint64_t

Loading…
Cancel
Save