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.
67 lines
1.8 KiB
C
67 lines
1.8 KiB
C
6 years ago
|
/*
|
||
|
* Copyright 2013-2019 Software Radio Systems Limited
|
||
|
*
|
||
|
* This file is part of srsLTE.
|
||
|
*
|
||
|
* srsLTE is free software: you can redistribute it and/or modify
|
||
|
* 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.
|
||
|
*
|
||
|
* srsLTE is distributed in the hope that it will be useful,
|
||
|
* 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/.
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
#ifndef SRSLTE_CHANNEL_H
|
||
|
#define SRSLTE_CHANNEL_H
|
||
|
|
||
|
#include "delay.h"
|
||
|
#include "fading.h"
|
||
|
#include <srslte/config.h>
|
||
|
#include <srslte/srslte.h>
|
||
|
#include <string>
|
||
|
|
||
|
namespace srslte {
|
||
|
|
||
|
class channel
|
||
|
{
|
||
|
public:
|
||
|
typedef struct {
|
||
|
// General
|
||
|
bool enable = false;
|
||
|
|
||
|
// Fading options
|
||
|
std::string fading_model = "";
|
||
|
|
||
|
// Delay options
|
||
|
float delay_min_us = 0;
|
||
|
float delay_max_us = 0;
|
||
|
uint32_t delay_period_s = 0;
|
||
|
} args_t;
|
||
|
|
||
|
channel(const args_t& channel_args, uint32_t _nof_ports);
|
||
|
~channel();
|
||
|
void set_srate(uint32_t srate);
|
||
|
void run(cf_t* in[SRSLTE_MAX_PORTS], cf_t* out[SRSLTE_MAX_PORTS], uint32_t len, const srslte_timestamp_t& t);
|
||
|
|
||
|
private:
|
||
|
srslte_channel_fading_t* fading[SRSLTE_MAX_PORTS];
|
||
|
srslte_channel_delay_t* delay[SRSLTE_MAX_PORTS];
|
||
|
cf_t* buffer_in = nullptr;
|
||
|
cf_t* buffer_out = nullptr;
|
||
|
uint32_t nof_ports = 0;
|
||
|
uint32_t current_srate = 0;
|
||
|
args_t args;
|
||
|
};
|
||
|
|
||
|
} // namespace srslte
|
||
|
|
||
|
#endif // SRSLTE_CHANNEL_H
|