srsLTE/srsenb/hdr/stack/upper/sdap.h

48 lines
1.1 KiB
C
Raw Normal View History

/**
2020-06-03 12:34:35 -07:00
*
* \section COPYRIGHT
2020-06-03 12:34:35 -07:00
*
2021-03-19 03:45:56 -07:00
* Copyright 2013-2021 Software Radio Systems Limited
2020-06-03 12:34:35 -07:00
*
* 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.
2020-06-03 12:34:35 -07:00
*
*/
#ifndef SRSENB_SDAP_H
#define SRSENB_SDAP_H
2021-03-19 03:45:56 -07:00
#include "srsran/common/buffer_pool.h"
#include "srsran/common/common.h"
#include "srsran/interfaces/gnb_interfaces.h"
#include "srsran/interfaces/ue_gw_interfaces.h"
2020-06-03 12:34:35 -07:00
namespace srsenb {
2020-06-04 08:01:16 -07:00
class sdap final : public sdap_interface_pdcp_nr, public sdap_interface_gtpu_nr
2020-06-03 12:34:35 -07:00
{
public:
explicit sdap();
2020-06-16 04:08:34 -07:00
bool init(pdcp_interface_sdap_nr* pdcp_, gtpu_interface_sdap_nr* gtpu_, srsue::gw_interface_pdcp* gw_);
2020-06-03 12:34:35 -07:00
void stop();
// Interface for PDCP
2021-03-19 03:45:56 -07:00
void write_pdu(uint16_t rnti, uint32_t lcid, srsran::unique_byte_buffer_t pdu) final;
2020-06-03 12:34:35 -07:00
// Interface for GTPU
2021-03-19 03:45:56 -07:00
void write_sdu(uint16_t rnti, uint32_t lcid, srsran::unique_byte_buffer_t pdu) final;
2020-06-03 12:34:35 -07:00
private:
2020-06-16 04:08:34 -07:00
gtpu_interface_sdap_nr* m_gtpu = nullptr;
pdcp_interface_sdap_nr* m_pdcp = nullptr;
srsue::gw_interface_pdcp* m_gw = nullptr;
2020-06-03 12:34:35 -07:00
// state
bool running = false;
};
} // namespace srsenb
#endif // SRSENB_SDAP_H