srsLTE/srsue/hdr/ue.h

125 lines
3.1 KiB
C
Raw Normal View History

2019-04-26 12:27:38 -07:00
/*
* Copyright 2013-2019 Software Radio Systems Limited
2017-05-30 06:38:04 -07:00
*
2019-04-26 12:27:38 -07:00
* This file is part of srsLTE.
2017-05-30 06:38:04 -07:00
*
2019-04-26 12:27:38 -07:00
* srsLTE is free software: you can redistribute it and/or modify
2017-05-30 06:38:04 -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-05-30 06:38:04 -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/.
*
*/
/******************************************************************************
* File: ue.h
* Description: Top-level UE class. Creates and links all
* layers and helpers.
*****************************************************************************/
2018-03-31 10:04:04 -07:00
#ifndef SRSUE_UE_H
#define SRSUE_UE_H
2017-05-30 06:38:04 -07:00
#include <stdarg.h>
#include <string>
#include <pthread.h>
#include "mac/mac.h"
2019-03-07 01:29:59 -08:00
#include "phy/phy.h"
#include "rrc/rrc.h"
#include "srslte/radio/radio_multi.h"
#include "srslte/upper/pdcp.h"
2019-03-07 01:29:59 -08:00
#include "srslte/upper/rlc.h"
#include "ue_base.h"
#include "upper/gw.h"
2019-03-07 01:29:59 -08:00
#include "upper/nas.h"
2017-05-30 06:38:04 -07:00
#include "upper/usim.h"
#include "srslte/common/buffer_pool.h"
#include "srslte/interfaces/ue_interfaces.h"
2017-06-23 07:29:46 -07:00
#include "srslte/common/logger_file.h"
#include "srslte/common/log_filter.h"
2017-05-30 06:38:04 -07:00
#include "ue_metrics_interface.h"
namespace srsue {
/*******************************************************************************
Main UE class
*******************************************************************************/
class ue
:public ue_base
2017-05-30 06:38:04 -07:00
{
public:
ue();
2017-05-30 06:38:04 -07:00
bool init(all_args_t *args_);
void stop();
2018-08-05 00:37:58 -07:00
bool switch_on();
bool switch_off();
2017-05-30 06:38:04 -07:00
bool is_attached();
void start_plot();
void print_mbms();
bool mbms_service_start(uint32_t serv, uint32_t port);
void print_pool();
2017-05-30 06:38:04 -07:00
static void rf_msg(srslte_rf_error_t error);
// UE metrics interface
bool get_metrics(ue_metrics_t &m);
void pregenerate_signals(bool enable);
2018-02-02 01:58:40 -08:00
void radio_overflow();
2017-05-30 06:38:04 -07:00
private:
2017-05-31 04:45:01 -07:00
virtual ~ue();
2017-05-30 06:38:04 -07:00
2019-04-23 01:53:11 -07:00
srslte::radio radios[SRSLTE_MAX_RADIOS];
srsue::phy phy;
srsue::mac mac;
2017-05-30 06:38:04 -07:00
srslte::mac_pcap mac_pcap;
srslte::nas_pcap nas_pcap;
srslte::rlc rlc;
srslte::pdcp pdcp;
srsue::rrc rrc;
srsue::nas nas;
srsue::gw gw;
srsue::usim_base* usim;
2017-05-30 06:38:04 -07:00
srslte::logger_stdout logger_stdout;
srslte::logger_file logger_file;
srslte::logger *logger;
2017-09-20 10:22:20 -07:00
// rf_log is on ue_base
2018-03-08 08:55:48 -08:00
std::vector<srslte::log_filter*> phy_log;
2017-06-23 07:29:46 -07:00
srslte::log_filter mac_log;
srslte::log_filter rlc_log;
srslte::log_filter pdcp_log;
srslte::log_filter rrc_log;
srslte::log_filter nas_log;
srslte::log_filter gw_log;
srslte::log_filter usim_log;
2018-07-12 07:57:22 -07:00
srslte::log_filter pool_log;
2017-05-30 06:38:04 -07:00
all_args_t *args;
bool started;
2017-09-20 14:06:08 -07:00
2017-05-30 06:38:04 -07:00
bool check_srslte_version();
};
} // namespace srsue
2018-03-31 10:04:04 -07:00
#endif // SRSUE_UE_H
2017-05-30 06:38:04 -07:00