srsLTE/srsenb/hdr/phy/txrx.h

61 lines
1.6 KiB
C
Raw Normal View History

/**
2017-06-02 03:46:06 -07:00
*
* \section COPYRIGHT
2017-06-02 03:46:06 -07:00
*
2021-03-19 03:45:56 -07:00
* Copyright 2013-2021 Software Radio Systems Limited
2017-06-02 03:46:06 -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.
2017-06-02 03:46:06 -07:00
*
*/
2017-06-01 03:25:57 -07:00
2018-03-31 10:04:04 -07:00
#ifndef SRSENB_TXRX_H
#define SRSENB_TXRX_H
2017-06-01 03:25:57 -07:00
2019-04-23 01:53:11 -07:00
#include "phy_common.h"
#include "prach_worker.h"
#include "srsenb/hdr/phy/lte/worker_pool.h"
#include "srsenb/hdr/phy/nr/worker_pool.h"
2021-03-19 03:45:56 -07:00
#include "srsran/config.h"
#include "srsran/phy/channel/channel.h"
#include "srsran/radio/radio.h"
#include <atomic>
2017-06-01 03:25:57 -07:00
namespace srsenb {
2021-03-19 03:45:56 -07:00
class txrx final : public srsran::thread
2017-06-01 03:25:57 -07:00
{
public:
2021-01-28 03:17:18 -08:00
txrx(srslog::basic_logger& logger);
2020-06-19 04:49:19 -07:00
bool init(stack_interface_phy_lte* stack_,
2021-03-19 03:45:56 -07:00
srsran::radio_interface_phy* radio_handler,
2020-11-23 00:43:12 -08:00
lte::worker_pool* lte_workers_,
phy_common* worker_com,
2019-10-23 07:32:28 -07:00
prach_worker_pool* prach_,
uint32_t prio);
2021-07-21 09:45:04 -07:00
bool set_nr_workers(nr::worker_pool* nr_workers_);
2017-06-01 03:25:57 -07:00
void stop();
2017-06-01 03:25:57 -07:00
private:
2020-03-03 08:27:04 -08:00
void run_thread() override;
2021-01-28 03:17:18 -08:00
stack_interface_phy_lte* stack = nullptr;
2021-03-19 03:45:56 -07:00
srsran::radio_interface_phy* radio_h = nullptr;
2021-01-28 03:17:18 -08:00
srslog::basic_logger& logger;
lte::worker_pool* lte_workers = nullptr;
nr::worker_pool* nr_workers = nullptr;
prach_worker_pool* prach = nullptr;
phy_common* worker_com = nullptr;
2021-03-19 03:45:56 -07:00
srsran::channel_ptr ul_channel = nullptr;
2019-10-17 07:44:45 -07:00
// Main system TTI counter
uint32_t tti = 0;
std::atomic<bool> running;
2017-06-01 03:25:57 -07:00
};
} // namespace srsenb
2018-03-31 10:04:04 -07:00
#endif // SRSENB_TXRX_H