2019-04-26 12:27:38 -07:00
|
|
|
/*
|
|
|
|
* Copyright 2013-2019 Software Radio Systems Limited
|
2017-06-02 03:46:06 -07:00
|
|
|
*
|
|
|
|
* This file is part of srsLTE.
|
|
|
|
*
|
2019-04-26 12:27:38 -07:00
|
|
|
* srsLTE is free software: you can redistribute it and/or modify
|
2017-06-02 03:46:06 -07:00
|
|
|
* it under the terms of the GNU Affero General Public License as
|
|
|
|
* published by the Free Software Foundation, either version 3 of
|
|
|
|
* the License, or (at your option) any later version.
|
|
|
|
*
|
2019-04-26 12:27:38 -07:00
|
|
|
* srsLTE is distributed in the hope that it will be useful,
|
2017-06-02 03:46:06 -07:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* A copy of the GNU Affero General Public License can be found in
|
|
|
|
* the LICENSE file in the top-level directory of this distribution
|
|
|
|
* and at http://www.gnu.org/licenses/.
|
|
|
|
*
|
|
|
|
*/
|
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"
|
2017-06-01 03:25:57 -07:00
|
|
|
#include "srslte/common/log.h"
|
|
|
|
#include "srslte/common/thread_pool.h"
|
2019-04-23 01:53:11 -07:00
|
|
|
#include "srslte/common/threads.h"
|
2019-10-23 09:09:39 -07:00
|
|
|
#include "srslte/phy/channel/channel.h"
|
2019-12-16 07:04:22 -08:00
|
|
|
#include "srslte/radio/radio.h"
|
2017-06-01 03:25:57 -07:00
|
|
|
|
|
|
|
namespace srsenb {
|
2019-12-16 07:04:22 -08:00
|
|
|
|
|
|
|
typedef _Complex float cf_t;
|
2017-06-01 03:25:57 -07:00
|
|
|
|
|
|
|
class txrx : public thread
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
txrx();
|
2019-07-05 07:47:39 -07:00
|
|
|
bool init(srslte::radio_interface_phy* radio_handler,
|
|
|
|
srslte::thread_pool* _workers_pool,
|
|
|
|
phy_common* worker_com,
|
2019-10-23 07:32:28 -07:00
|
|
|
prach_worker_pool* prach_,
|
2019-07-05 07:47:39 -07:00
|
|
|
srslte::log* log_h,
|
|
|
|
uint32_t prio);
|
2017-06-01 03:25:57 -07:00
|
|
|
void stop();
|
2019-12-16 07:04:22 -08:00
|
|
|
|
2017-06-01 03:25:57 -07:00
|
|
|
private:
|
2019-10-17 07:44:45 -07:00
|
|
|
void run_thread() final;
|
2019-07-05 07:47:39 -07:00
|
|
|
|
2019-10-17 07:44:45 -07:00
|
|
|
srslte::radio_interface_phy* radio_h = nullptr;
|
|
|
|
srslte::log* log_h = nullptr;
|
|
|
|
srslte::thread_pool* workers_pool = nullptr;
|
2019-10-23 07:32:28 -07:00
|
|
|
prach_worker_pool* prach = nullptr;
|
2019-10-17 07:44:45 -07:00
|
|
|
phy_common* worker_com = nullptr;
|
2019-10-23 09:09:39 -07:00
|
|
|
srslte::channel_ptr ul_channel = nullptr;
|
2018-09-06 06:22:37 -07:00
|
|
|
|
2019-10-17 07:44:45 -07:00
|
|
|
// Main system TTI counter
|
|
|
|
uint32_t tti = 0;
|
2018-09-06 06:22:37 -07:00
|
|
|
|
2019-10-17 07:44:45 -07:00
|
|
|
uint32_t tx_worker_cnt = 0;
|
|
|
|
uint32_t nof_workers = 0;
|
|
|
|
bool running = false;
|
2017-06-01 03:25:57 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace srsenb
|
|
|
|
|
2018-03-31 10:04:04 -07:00
|
|
|
#endif // SRSENB_TXRX_H
|