move ue phy interfaces to separate interfaces header file

master
Francisco 4 years ago committed by Francisco Paisana
parent 13d805ef56
commit b329e25bbb

@ -19,170 +19,11 @@
#ifndef SRSLTE_UE_INTERFACES_H
#define SRSLTE_UE_INTERFACES_H
#include <set>
#include <string>
#include "mac_interface_types.h"
#include "pdcp_interface_types.h"
#include "rlc_interface_types.h"
#include "rrc_interface_types.h"
#include "srslte/asn1/asn1_utils.h"
#include "srslte/asn1/liblte_mme.h"
#include "srslte/common/common.h"
#include "srslte/common/interfaces_common.h"
#include "srslte/common/security.h"
#include "srslte/common/stack_procedure.h"
#include "srslte/common/tti_point.h"
#include "srslte/phy/channel/channel.h"
#include "srslte/phy/rf/rf.h"
#include "srslte/upper/pdcp_entity_base.h"
#include "ue_mac_interfaces.h"
#include "ue_rrc_interfaces.h"
namespace srsue {
typedef struct {
std::string type = "lte";
srslte::phy_log_args_t log;
std::string dl_earfcn = "3400"; // comma-separated list of DL EARFCNs
std::string ul_earfcn = ""; // comma-separated list of UL EARFCNs
std::vector<uint32_t> dl_earfcn_list = {3400}; // vectorized version of dl_earfcn that gets populated during init
std::map<uint32_t, uint32_t> ul_earfcn_map; // Map linking DL EARFCN and UL EARFCN
std::string dl_nr_arfcn = "632628"; // comma-separated list of DL NR ARFCNs
std::vector<uint32_t> dl_nr_arfcn_list = {
632628}; // vectorized version of dl_nr_arfcn that gets populated during init
float dl_freq = -1.0f;
float ul_freq = -1.0f;
bool ul_pwr_ctrl_en = false;
float prach_gain = -1;
uint32_t pdsch_max_its = 8;
bool meas_evm = false;
uint32_t nof_phy_threads = 3;
int worker_cpu_mask = -1;
int sync_cpu_affinity = -1;
uint32_t nof_lte_carriers = 1;
uint32_t nof_nr_carriers = 0;
uint32_t nr_nof_prb = 50;
double nr_freq_hz = 2630e6;
uint32_t nof_rx_ant = 1;
std::string equalizer_mode = "mmse";
int cqi_max = 15;
int cqi_fixed = -1;
float snr_ema_coeff = 0.1f;
std::string snr_estim_alg = "refs";
bool agc_enable = true;
bool correct_sync_error = false;
bool cfo_is_doppler = false;
bool cfo_integer_enabled = false;
float cfo_correct_tol_hz = 1.0f;
float cfo_pss_ema = DEFAULT_CFO_EMA_TRACK;
float cfo_loop_bw_pss = DEFAULT_CFO_BW_PSS;
float cfo_loop_bw_ref = DEFAULT_CFO_BW_REF;
float cfo_loop_ref_min = DEFAULT_CFO_REF_MIN;
float cfo_loop_pss_tol = DEFAULT_CFO_PSS_MIN;
float sfo_ema = DEFAULT_SFO_EMA_COEFF;
uint32_t sfo_correct_period = DEFAULT_SAMPLE_OFFSET_CORRECT_PERIOD;
uint32_t cfo_loop_pss_conv = DEFAULT_PSS_STABLE_TIMEOUT;
uint32_t cfo_ref_mask = 1023;
bool interpolate_subframe_enabled = false;
bool estimator_fil_auto = false;
float estimator_fil_stddev = 1.0f;
uint32_t estimator_fil_order = 4;
float snr_to_cqi_offset = 0.0f;
std::string sss_algorithm = "full";
float rx_gain_offset = 62;
bool pdsch_csi_enabled = true;
bool pdsch_8bit_decoder = false;
uint32_t intra_freq_meas_len_ms = 20;
uint32_t intra_freq_meas_period_ms = 200;
float force_ul_amplitude = 0.0f;
float in_sync_rsrp_dbm_th = -130.0f;
float in_sync_snr_db_th = 1.0f;
uint32_t nof_in_sync_events = 10;
uint32_t nof_out_of_sync_events = 20;
srslte::channel::args_t dl_channel_args;
srslte::channel::args_t ul_channel_args;
srslte::vnf_args_t vnf_args;
} phy_args_t;
/* RAT agnostic Interface MAC -> PHY */
class phy_interface_mac_common
{
public:
/* Sets a C-RNTI allowing the PHY to pregenerate signals if necessary */
virtual void set_crnti(uint16_t rnti) = 0;
/* Time advance commands */
virtual void set_timeadv_rar(uint32_t ta_cmd) = 0;
virtual void set_timeadv(uint32_t ta_cmd) = 0;
/* Activate / Disactivate SCell*/
virtual void set_activation_deactivation_scell(uint32_t cmd, uint32_t tti) = 0;
/* Sets RAR dci payload */
virtual void set_rar_grant(uint8_t grant_payload[SRSLTE_RAR_GRANT_LEN], uint16_t rnti) = 0;
virtual uint32_t get_current_tti() = 0;
virtual float get_phr() = 0;
virtual float get_pathloss_db() = 0;
};
/* Interface MAC -> PHY */
class phy_interface_mac_lte : public phy_interface_mac_common
{
public:
typedef struct {
bool is_transmitted;
uint32_t tti_ra;
uint32_t f_id;
uint32_t preamble_format;
} prach_info_t;
virtual void
prach_send(uint32_t preamble_idx, int allowed_subframe, float target_power_dbm, float ta_base_sec = 0.0f) = 0;
virtual prach_info_t prach_get_info() = 0;
/* Indicates the transmission of a SR signal in the next opportunity */
virtual void sr_send() = 0;
virtual int sr_last_tx_tti() = 0;
virtual void set_mch_period_stop(uint32_t stop) = 0;
};
class phy_interface_rrc_lte
{
public:
virtual bool set_config(srslte::phy_cfg_t config, uint32_t cc_idx = 0) = 0;
virtual bool set_scell(srslte_cell_t cell_info, uint32_t cc_idx, uint32_t earfcn) = 0;
virtual void set_config_tdd(srslte_tdd_config_t& tdd_config) = 0;
virtual void set_config_mbsfn_sib2(srslte::mbsfn_sf_cfg_t* cfg_list, uint32_t nof_cfgs) = 0;
virtual void set_config_mbsfn_sib13(const srslte::sib13_t& sib13) = 0;
virtual void set_config_mbsfn_mcch(const srslte::mcch_msg_t& mcch) = 0;
virtual void deactivate_scells() = 0;
/* Measurements interface */
virtual void set_cells_to_meas(uint32_t earfcn, const std::set<uint32_t>& pci) = 0;
virtual void meas_stop() = 0;
/* Cell search and selection procedures */
virtual bool cell_search() = 0;
virtual bool cell_select(phy_cell_t cell) = 0;
virtual bool cell_is_camping() = 0;
virtual void enable_pregen_signals(bool enable) = 0;
};
// STACK interface for RRC
class stack_interface_rrc
{
@ -198,10 +39,6 @@ public:
virtual void run_tti(const uint32_t tti, const uint32_t tti_jump) = 0;
};
// Combined interface for stack (MAC and RRC) to access PHY
class phy_interface_stack_lte : public phy_interface_mac_lte, public phy_interface_rrc_lte
{};
} // namespace srsue
#endif // SRSLTE_UE_INTERFACES_H

@ -13,6 +13,8 @@
#ifndef SRSLTE_UE_MAC_INTERFACES_H
#define SRSLTE_UE_MAC_INTERFACES_H
#include "mac_interface_types.h"
namespace srsue {
class mac_interface_phy_lte

@ -0,0 +1,177 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* 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.
*
*/
#ifndef SRSLTE_UE_PHY_INTERFACES_H
#define SRSLTE_UE_PHY_INTERFACES_H
#include "srslte/srslte.h"
#include "phy_interface_types.h"
#include "rrc_interface_types.h"
#include "srslte/common/interfaces_common.h"
#include "srslte/phy/channel/channel.h"
#include <map>
#include <set>
#include <string>
namespace srsue {
struct phy_args_t {
std::string type = "lte";
srslte::phy_log_args_t log;
std::string dl_earfcn = "3400"; // comma-separated list of DL EARFCNs
std::string ul_earfcn = ""; // comma-separated list of UL EARFCNs
std::vector<uint32_t> dl_earfcn_list = {3400}; // vectorized version of dl_earfcn that gets populated during init
std::map<uint32_t, uint32_t> ul_earfcn_map; // Map linking DL EARFCN and UL EARFCN
std::string dl_nr_arfcn = "632628"; // comma-separated list of DL NR ARFCNs
std::vector<uint32_t> dl_nr_arfcn_list = {
632628}; // vectorized version of dl_nr_arfcn that gets populated during init
float dl_freq = -1.0f;
float ul_freq = -1.0f;
bool ul_pwr_ctrl_en = false;
float prach_gain = -1;
uint32_t pdsch_max_its = 8;
bool meas_evm = false;
uint32_t nof_phy_threads = 3;
int worker_cpu_mask = -1;
int sync_cpu_affinity = -1;
uint32_t nof_lte_carriers = 1;
uint32_t nof_nr_carriers = 0;
uint32_t nr_nof_prb = 50;
double nr_freq_hz = 2630e6;
uint32_t nof_rx_ant = 1;
std::string equalizer_mode = "mmse";
int cqi_max = 15;
int cqi_fixed = -1;
float snr_ema_coeff = 0.1f;
std::string snr_estim_alg = "refs";
bool agc_enable = true;
bool correct_sync_error = false;
bool cfo_is_doppler = false;
bool cfo_integer_enabled = false;
float cfo_correct_tol_hz = 1.0f;
float cfo_pss_ema = DEFAULT_CFO_EMA_TRACK;
float cfo_loop_bw_pss = DEFAULT_CFO_BW_PSS;
float cfo_loop_bw_ref = DEFAULT_CFO_BW_REF;
float cfo_loop_ref_min = DEFAULT_CFO_REF_MIN;
float cfo_loop_pss_tol = DEFAULT_CFO_PSS_MIN;
float sfo_ema = DEFAULT_SFO_EMA_COEFF;
uint32_t sfo_correct_period = DEFAULT_SAMPLE_OFFSET_CORRECT_PERIOD;
uint32_t cfo_loop_pss_conv = DEFAULT_PSS_STABLE_TIMEOUT;
uint32_t cfo_ref_mask = 1023;
bool interpolate_subframe_enabled = false;
bool estimator_fil_auto = false;
float estimator_fil_stddev = 1.0f;
uint32_t estimator_fil_order = 4;
float snr_to_cqi_offset = 0.0f;
std::string sss_algorithm = "full";
float rx_gain_offset = 62;
bool pdsch_csi_enabled = true;
bool pdsch_8bit_decoder = false;
uint32_t intra_freq_meas_len_ms = 20;
uint32_t intra_freq_meas_period_ms = 200;
float force_ul_amplitude = 0.0f;
float in_sync_rsrp_dbm_th = -130.0f;
float in_sync_snr_db_th = 1.0f;
uint32_t nof_in_sync_events = 10;
uint32_t nof_out_of_sync_events = 20;
srslte::channel::args_t dl_channel_args;
srslte::channel::args_t ul_channel_args;
srslte::vnf_args_t vnf_args;
};
/* RAT agnostic Interface MAC -> PHY */
class phy_interface_mac_common
{
public:
/* Sets a C-RNTI allowing the PHY to pregenerate signals if necessary */
virtual void set_crnti(uint16_t rnti) = 0;
/* Time advance commands */
virtual void set_timeadv_rar(uint32_t ta_cmd) = 0;
virtual void set_timeadv(uint32_t ta_cmd) = 0;
/* Activate / Disactivate SCell*/
virtual void set_activation_deactivation_scell(uint32_t cmd, uint32_t tti) = 0;
/* Sets RAR dci payload */
virtual void set_rar_grant(uint8_t grant_payload[SRSLTE_RAR_GRANT_LEN], uint16_t rnti) = 0;
virtual uint32_t get_current_tti() = 0;
virtual float get_phr() = 0;
virtual float get_pathloss_db() = 0;
};
/* Interface MAC -> PHY */
class phy_interface_mac_lte : public phy_interface_mac_common
{
public:
typedef struct {
bool is_transmitted;
uint32_t tti_ra;
uint32_t f_id;
uint32_t preamble_format;
} prach_info_t;
virtual void
prach_send(uint32_t preamble_idx, int allowed_subframe, float target_power_dbm, float ta_base_sec = 0.0f) = 0;
virtual prach_info_t prach_get_info() = 0;
/* Indicates the transmission of a SR signal in the next opportunity */
virtual void sr_send() = 0;
virtual int sr_last_tx_tti() = 0;
virtual void set_mch_period_stop(uint32_t stop) = 0;
};
class phy_interface_rrc_lte
{
public:
virtual bool set_config(srslte::phy_cfg_t config, uint32_t cc_idx = 0) = 0;
virtual bool set_scell(srslte_cell_t cell_info, uint32_t cc_idx, uint32_t earfcn) = 0;
virtual void set_config_tdd(srslte_tdd_config_t& tdd_config) = 0;
virtual void set_config_mbsfn_sib2(srslte::mbsfn_sf_cfg_t* cfg_list, uint32_t nof_cfgs) = 0;
virtual void set_config_mbsfn_sib13(const srslte::sib13_t& sib13) = 0;
virtual void set_config_mbsfn_mcch(const srslte::mcch_msg_t& mcch) = 0;
virtual void deactivate_scells() = 0;
/* Measurements interface */
virtual void set_cells_to_meas(uint32_t earfcn, const std::set<uint32_t>& pci) = 0;
virtual void meas_stop() = 0;
/* Cell search and selection procedures */
virtual bool cell_search() = 0;
virtual bool cell_select(phy_cell_t cell) = 0;
virtual bool cell_is_camping() = 0;
virtual void enable_pregen_signals(bool enable) = 0;
};
// Combined interface for stack (MAC and RRC) to access PHY
class phy_interface_stack_lte : public phy_interface_mac_lte, public phy_interface_rrc_lte
{};
} // namespace srsue
#endif // SRSLTE_UE_PHY_INTERFACES_H

@ -14,7 +14,10 @@
#define SRSLTE_UE_RRC_INTERFACES_H
#include "phy_interface_types.h"
#include "rrc_interface_types.h"
#include "srslte/asn1/asn1_utils.h"
#include "srslte/common/byte_buffer.h"
#include "srslte/common/tti_point.h"
namespace srsue {

@ -14,7 +14,9 @@
#define SRSUE_DUMMY_CLASSES_H
#include "srslte/common/task_scheduler.h"
#include "srslte/interfaces/phy_interface_types.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/interfaces/ue_phy_interfaces.h"
#include "srslte/interfaces/ue_rlc_interfaces.h"
namespace srsue {

@ -18,6 +18,7 @@
#include "srslte/common/task_scheduler.h"
#include "srslte/interfaces/ue_pdcp_interfaces.h"
#include "srslte/upper/pdcp_entity_lte.h"
#include <set>
namespace srslte {

@ -18,7 +18,7 @@
#include "srslte/common/log.h"
#include "srslte/common/security.h"
#include "srslte/common/threads.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/interfaces/ue_rrc_interfaces.h"
#include "srslte/upper/pdcp_entity_base.h"
namespace srsue {

@ -16,9 +16,10 @@
#include "srslte/common/buffer_pool.h"
#include "srslte/common/common.h"
#include "srslte/common/log.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/common/task_scheduler.h"
#include "srslte/interfaces/ue_pdcp_interfaces.h"
#include "srslte/interfaces/ue_rlc_interfaces.h"
#include "srslte/interfaces/ue_rrc_interfaces.h"
#include "srslte/upper/rlc_common.h"
#include "srslte/upper/rlc_metrics.h"

@ -16,7 +16,6 @@
#include "srslte/common/buffer_pool.h"
#include "srslte/common/common.h"
#include "srslte/common/log.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/upper/byte_buffer_queue.h"
#include "srslte/upper/rlc_common.h"
#include <map>

@ -18,8 +18,8 @@
#include "srslte/common/buffer_pool.h"
#include "srslte/common/common.h"
#include "srslte/common/log.h"
#include "srslte/common/task_scheduler.h"
#include "srslte/common/timeout.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/upper/byte_buffer_queue.h"
#include "srslte/upper/rlc_am_base.h"
#include "srslte/upper/rlc_common.h"
@ -30,8 +30,9 @@
namespace srsue {
class pdcp_interface_rlc;
class rrc_interface_rlc;
}
} // namespace srsue
namespace srslte {

@ -16,7 +16,6 @@
#include "srslte/common/buffer_pool.h"
#include "srslte/common/common.h"
#include "srslte/common/log.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/upper/byte_buffer_queue.h"
#include "srslte/upper/rlc_am_base.h"
#include <map>

@ -15,6 +15,7 @@
#include "srslte/common/block_queue.h"
#include "srslte/common/logmap.h"
#include "srslte/interfaces/rlc_interface_types.h"
#include "srslte/upper/rlc_metrics.h"
#include <stdlib.h>

@ -16,15 +16,15 @@
#include "srslte/common/buffer_pool.h"
#include "srslte/common/common.h"
#include "srslte/common/log.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/upper/byte_buffer_queue.h"
#include "srslte/upper/rlc_common.h"
namespace srsue {
class pdcp_interface_rlc;
class rrc_interface_rlc;
}
} // namespace srsue
namespace srslte {

@ -17,7 +17,7 @@
#include "srslte/common/buffer_pool.h"
#include "srslte/common/common.h"
#include "srslte/common/log.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/common/task_scheduler.h"
#include "srslte/upper/byte_buffer_queue.h"
#include "srslte/upper/rlc_common.h"
#include <map>
@ -28,8 +28,9 @@
namespace srsue {
class pdcp_interface_rlc;
class rrc_interface_rlc;
}
} // namespace srsue
namespace srslte {

@ -16,7 +16,6 @@
#include "srslte/common/buffer_pool.h"
#include "srslte/common/common.h"
#include "srslte/common/log.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/upper/byte_buffer_queue.h"
#include "srslte/upper/rlc_um_base.h"
#include <map>

@ -12,6 +12,7 @@
#include "srslte/upper/rlc_am_lte.h"
#include "srslte/interfaces/ue_pdcp_interfaces.h"
#include "srslte/interfaces/ue_rrc_interfaces.h"
#include <iostream>

@ -12,6 +12,7 @@
#include "srslte/upper/rlc_tm.h"
#include "srslte/interfaces/ue_pdcp_interfaces.h"
#include "srslte/interfaces/ue_rrc_interfaces.h"
namespace srslte {

@ -11,6 +11,7 @@
*/
#include "srslte/upper/rlc_um_base.h"
#include "srslte/interfaces/ue_rrc_interfaces.h"
#include <sstream>
namespace srslte {

@ -15,8 +15,8 @@
#include "srslte/common/logmap.h"
#include "srslte/common/mac_pcap.h"
#include "srslte/common/test_common.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/mac/pdu.h"
#include "srslte/srslte.h"
#include <bitset>
#include <iostream>
#include <map>

@ -15,7 +15,9 @@
#include "srslte/common/test_common.h"
#include "srslte/common/threads.h"
#include "srslte/interfaces/ue_pdcp_interfaces.h"
#include "srslte/interfaces/ue_rrc_interfaces.h"
#include "srslte/upper/rlc_am_lte.h"
#define NBUFS 5
#define HAVE_PCAP 0
#define SDU_SIZE 500

@ -13,8 +13,9 @@
#ifndef SRSLTE_RLC_TEST_COMMON_H
#define SRSLTE_RLC_TEST_COMMON_H
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/common/byte_buffer.h"
#include "srslte/interfaces/ue_pdcp_interfaces.h"
#include "srslte/interfaces/ue_rrc_interfaces.h"
#include <vector>
namespace srslte {

@ -179,7 +179,7 @@ int rlc_um_nr_test2(bool reverse_rx = false)
// Read PDUs from RLC1 with grant of 25 Bytes each
const uint32_t max_num_pdus = 10;
uint32 num_pdus = 0;
uint32_t num_pdus = 0;
unique_byte_buffer_t pdu_bufs[max_num_pdus];
while (ctxt.rlc1.get_buffer_state() != 0 && num_pdus < max_num_pdus) {
@ -248,7 +248,7 @@ int rlc_um_nr_test4()
// Read PDUs from RLC1 with grant of 25 Bytes each
const uint32_t max_num_pdus = 20;
uint32 num_pdus = 0;
uint32_t num_pdus = 0;
unique_byte_buffer_t pdu_bufs[max_num_pdus];
while (ctxt.rlc1.get_buffer_state() != 0 && num_pdus < max_num_pdus) {
@ -323,7 +323,7 @@ int rlc_um_nr_test5(const uint32_t last_sn)
// Read PDUs from RLC1 with grant of 25 Bytes each
const uint32_t max_num_pdus = 10;
uint32 num_pdus = 0;
uint32_t num_pdus = 0;
unique_byte_buffer_t pdu_bufs[max_num_pdus];
while (ctxt.rlc1.get_buffer_state() != 0 && num_pdus < max_num_pdus) {
@ -390,7 +390,7 @@ int rlc_um_nr_test6()
// Read PDUs from RLC1 with grant of 8 Bytes each
const uint32_t max_num_pdus = num_sdus * 2; // we need 2 PDUs for each SDU
uint32 num_pdus = 0;
uint32_t num_pdus = 0;
unique_byte_buffer_t pdu_bufs[max_num_pdus];
while (ctxt.rlc1.get_buffer_state() != 0 && num_pdus < max_num_pdus) {
@ -450,7 +450,7 @@ int rlc_um_nr_test7()
// Read PDUs from RLC1 with grant of 8 Bytes each
const uint32_t max_num_pdus = num_sdus * 2; // we need 2 PDUs for each SDU
uint32 num_pdus = 0;
uint32_t num_pdus = 0;
unique_byte_buffer_t pdu_bufs[max_num_pdus];
while (ctxt.rlc1.get_buffer_state() != 0 && num_pdus < max_num_pdus) {
@ -514,7 +514,7 @@ int rlc_um_nr_test8()
// Read PDUs from RLC1 with grant of 8 Bytes each
const uint32_t max_num_pdus = 20 * 2; // we need 2 PDUs for each SDU
uint32 num_pdus = 0;
uint32_t num_pdus = 0;
unique_byte_buffer_t pdu_bufs[max_num_pdus];
while (ctxt.rlc1.get_buffer_state() != 0 && num_pdus < max_num_pdus) {

@ -20,6 +20,7 @@
#include "srslte/common/config_file.h"
#include "srslte/common/crash_handler.h"
#include "srslte/common/logger_srslog_wrapper.h"
#include "srslte/common/logmap.h"
#include "srslte/common/signal_handler.h"
#include "srslte/srslog/srslog.h"

@ -15,12 +15,12 @@
#include "phy_common.h"
#include "phy_metrics.h"
#include "srslte/common/block_queue.h"
#include "srslte/common/log_filter.h"
#include "srslte/common/threads.h"
#include "srslte/common/trace.h"
#include "srslte/interfaces/phy_interface_types.h"
#include "srslte/interfaces/radio_interfaces.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/radio/radio.h"
#include "srslte/srslog/srslog.h"
#include "srslte/srslte.h"

@ -18,8 +18,10 @@
#include "srslte/common/gen_mch_tables.h"
#include "srslte/common/log.h"
#include "srslte/common/tti_sempahore.h"
#include "srslte/interfaces/phy_interface_types.h"
#include "srslte/interfaces/radio_interfaces.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/interfaces/rrc_interface_types.h"
#include "srslte/interfaces/ue_phy_interfaces.h"
#include "srslte/radio/radio.h"
#include "srslte/srslog/srslog.h"
#include "srslte/srslte.h"
@ -32,6 +34,8 @@
namespace srsue {
class stack_interface_phy_lte;
class rsrp_insync_itf
{
public:

@ -14,7 +14,7 @@
#define SRSUE_PRACH_H
#include "srslte/common/log.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/interfaces/ue_phy_interfaces.h"
#include "srslte/radio/radio.h"
#include "srslte/srslog/srslog.h"
#include "srslte/srslte.h"

@ -13,7 +13,6 @@
#ifndef SRSUE_SEARCH_H
#define SRSUE_SEARCH_H
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/radio/radio.h"
#include "srslte/srslog/srslog.h"
#include "srslte/srslte.h"

@ -13,13 +13,14 @@
#ifndef SRSUE_SFN_SYNC_H
#define SRSUE_SFN_SYNC_H
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/radio/radio.h"
#include "srslte/srslog/srslog.h"
#include "srslte/srslte.h"
namespace srsue {
class phy_args_t;
// Class to synchronize system frame number
class sfn_sync
{

@ -29,7 +29,6 @@
#include "srslte/common/threads.h"
#include "srslte/common/tti_sync_cv.h"
#include "srslte/interfaces/radio_interfaces.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/phy/channel/channel.h"
#include "srslte/srslte.h"
#include "srsue/hdr/phy/lte/worker_pool.h"

@ -24,6 +24,8 @@
namespace srsue {
class stack_interface_phy_lte;
class ue_lte_phy_base : public ue_phy_base, public phy_interface_stack_lte, public srslte::phy_interface_radio
{
public:

@ -19,7 +19,7 @@
#define SRSUE_UE_PHY_BASE_H
#include "srslte/common/logger.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/interfaces/ue_phy_interfaces.h"
#include "srsue/hdr/phy/phy_metrics.h"
namespace srsue {

@ -15,7 +15,7 @@
#include "srslte/common/log.h"
#include "srslte/common/timers.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/interfaces/ue_mac_interfaces.h"
#include "srslte/interfaces/ue_rlc_interfaces.h"
#include "srslte/mac/pdu.h"
#include "srslte/mac/pdu_queue.h"
@ -26,6 +26,7 @@
namespace srsue {
class rlc_interface_mac;
class phy_interface_mac_common;
class mac_interface_demux
{

@ -19,8 +19,6 @@
#include "srslte/common/mac_pcap.h"
#include "srslte/common/timers.h"
#include "srslte/interfaces/ue_interfaces.h"
/* Downlink HARQ entity as defined in 5.3.2 of 36.321 */
namespace srsue {

@ -26,7 +26,7 @@
#include "srslte/common/threads.h"
#include "srslte/common/timers.h"
#include "srslte/common/tti_sync_cv.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/interfaces/ue_rrc_interfaces.h"
#include "srslte/srslog/srslog.h"
#include "ul_harq.h"
#include <condition_variable>

@ -22,7 +22,6 @@
#include "srslte/common/common.h"
#include "srslte/common/log.h"
#include "srslte/interfaces/mac_interface_types.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/mac/pdu.h"
#include "srslte/srslog/srslog.h"
#include <mutex>

@ -18,8 +18,7 @@
#include "proc_sr.h"
#include "srslte/common/logmap.h"
#include "srslte/common/timers.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/common/task_scheduler.h"
#include "srslte/srslog/srslog.h"
/* Buffer status report procedure */

@ -14,8 +14,8 @@
#define SRSUE_PROC_PHR_H
#include "srslte/common/logmap.h"
#include "srslte/common/timers.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/common/task_scheduler.h"
#include "srslte/interfaces/ue_mac_interfaces.h"
#include "srslte/srslog/srslog.h"
#include <stdint.h>
@ -23,6 +23,8 @@
namespace srsue {
class phy_interface_mac_lte;
class phr_proc : public srslte::timer_callback
{
public:

@ -14,7 +14,7 @@
#define SRSUE_PROC_SR_H
#include "srslte/common/logmap.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/interfaces/ue_mac_interfaces.h"
#include "srslte/srslog/srslog.h"
#include <stdint.h>
@ -22,8 +22,9 @@
namespace srsue {
// Forward-declare ra_proc
class ra_proc;
class phy_interface_mac_lte;
class rrc_interface_mac;
class sr_proc
{

@ -19,7 +19,6 @@
#include "srslte/common/log.h"
#include "srslte/common/mac_pcap.h"
#include "srslte/common/timers.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "ul_sps.h"
using namespace srslte;

@ -16,7 +16,9 @@
#include "srslte/adt/observer.h"
#include "srslte/common/fsm.h"
#include "srslte/common/logmap.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/common/task_scheduler.h"
#include "srslte/interfaces/ue_phy_interfaces.h"
#include "srslte/interfaces/ue_rrc_interfaces.h"
#include <bitset>
namespace srsue {

@ -63,6 +63,7 @@ class gw_interface_rrc;
class pdcp_interface_rrc;
class rlc_interface_rrc;
class nas_interface_rrc;
class phy_interface_rrc_lte;
class rrc : public rrc_interface_nas,
public rrc_interface_phy_lte,

@ -14,7 +14,7 @@
#define SRSUE_RRC_METRICS_H
#include "rrc_common.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/interfaces/phy_interface_types.h"
namespace srsue {

@ -17,9 +17,12 @@
#include "srslte/asn1/rrc_nr_utils.h"
#include "srslte/common/block_queue.h"
#include "srslte/common/buffer_pool.h"
#include "srslte/common/logmap.h"
#include "srslte/common/stack_procedure.h"
#include "srslte/common/task_scheduler.h"
#include "srslte/interfaces/nr_common_interface_types.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/interfaces/ue_nr_interfaces.h"
#include "srslte/interfaces/ue_rrc_interfaces.h"
#include "srsue/hdr/stack/upper/gw.h"
namespace srsue {
@ -27,6 +30,7 @@ namespace srsue {
class usim_interface_rrc_nr;
class pdcp_interface_rrc;
class rlc_interface_rrc;
class stack_interface_rrc;
// Expert arguments to create GW without proper RRC
struct core_less_args_t {

@ -14,7 +14,6 @@
#define SRSUE_UE_STACK_BASE_H
#include "srslte/common/logger.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srsue/hdr/stack/upper/nas_config.h"
#include "srsue/hdr/ue_metrics_interface.h"

@ -44,6 +44,8 @@
namespace srsue {
class phy_interface_stack_lte;
class ue_stack_lte final : public ue_stack_base,
public stack_interface_phy_lte,
public stack_interface_phy_nr,

@ -16,7 +16,6 @@
#include "srslte/common/common.h"
#include "srslte/common/log.h"
#include "srslte/common/security.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srsue/hdr/stack/upper/usim.h"
#include <string>
#include <winscard.h>

@ -16,7 +16,6 @@
#include "srslte/common/common.h"
#include "srslte/common/log.h"
#include "srslte/common/security.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "usim_base.h"
#include <string>

@ -26,7 +26,6 @@
#include "phy/ue_phy_base.h"
#include "srslte/common/buffer_pool.h"
#include "srslte/common/log_filter.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/radio/radio.h"
#include "srslte/srslog/srslog.h"
#include "stack/ue_stack_base.h"

@ -10,12 +10,10 @@
*
*/
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/srslte.h"
#include "srsue/hdr/phy/lte/sf_worker.h"
#include <string.h>
#include <unistd.h>
#define Error(fmt, ...) \
if (SRSLTE_DEBUG_ENABLED) \
@ -168,7 +166,6 @@ void sf_worker::set_config_unlocked(uint32_t cc_idx, srslte::phy_cfg_t phy_cfg)
void sf_worker::work_imp()
{
srslte::rf_buffer_t tx_signal_ptr = {};
if (!cell_initiated) {
phy->worker_end(this, false, tx_signal_ptr, tx_time, false);
@ -183,7 +180,6 @@ void sf_worker::work_imp()
// Loop through all carriers. carrier_idx=0 is PCell
for (uint32_t carrier_idx = 0; carrier_idx < cc_workers.size(); carrier_idx++) {
// Process all DL and special subframes
if (srslte_sfidx_tdd_type(tdd_config, tti % 10) != SRSLTE_TDD_SF_U || cell.frame_type == SRSLTE_FDD) {
srslte_mbsfn_cfg_t mbsfn_cfg;
@ -205,7 +201,6 @@ void sf_worker::work_imp()
if ((srslte_sfidx_tdd_type(tdd_config, TTI_TX(tti) % 10) == SRSLTE_TDD_SF_U) || cell.frame_type == SRSLTE_FDD) {
// Generate Uplink signal if no PRACH pending
if (!prach_ptr) {
// Common UCI data object for all carriers
srslte_uci_data_t uci_data;
reset_uci(&uci_data);

@ -552,7 +552,7 @@ void phy_common::worker_end(void* tx_sem_id,
if (nr_tx_buffer_ready) {
// Load NR carrier base-band
for (uint32_t i = 0; i < args->nof_nr_carriers * args->nof_rx_ant; i++) {
uint32 channel_idx = args->nof_lte_carriers * args->nof_rx_ant + i;
uint32_t channel_idx = args->nof_lte_carriers * args->nof_rx_ant + i;
buffer.set(channel_idx, nr_tx_buffer.get(i));
}

@ -13,7 +13,6 @@
#include "srsue/hdr/phy/prach.h"
#include "srslte/common/log.h"
#include "srslte/interfaces/phy_interface_types.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/srslte.h"
#define Error(fmt, ...) \

@ -11,6 +11,7 @@
*/
#include "srsue/hdr/phy/sfn_sync.h"
#include "srslte/interfaces/ue_phy_interfaces.h"
#define Error(fmt, ...) \
if (SRSLTE_DEBUG_ENABLED) \
@ -108,7 +109,6 @@ sfn_sync::ret_code sfn_sync::decode_mib(srslte_cell_t*
}
if (srslte_ue_sync_get_sfidx(ue_sync) == 0) {
// Skip MIB decoding if we are only interested in subframe 0
if (sfidx_only) {
if (tti_cnt) {

@ -16,8 +16,7 @@
#define Debug(fmt, ...) logger.debug(fmt, ##__VA_ARGS__)
#include "srsue/hdr/stack/mac/demux.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srsue/hdr/stack/mac/mac.h"
#include "srslte/interfaces/ue_phy_interfaces.h"
namespace srsue {

@ -19,7 +19,6 @@
#include "srslte/common/log.h"
#include "srslte/common/mac_pcap.h"
#include "srslte/common/timers.h"
#include "srslte/interfaces/ue_interfaces.h"
namespace srsue {
@ -229,7 +228,6 @@ void dl_harq_entity::dl_harq_process::dl_tb_process::reset_ndi()
void dl_harq_entity::dl_harq_process::dl_tb_process::new_grant_dl(mac_interface_phy_lte::mac_grant_dl_t grant,
mac_interface_phy_lte::tb_action_dl_t* action)
{
mutex.lock();
// Compute RV for BCCH when not specified in PDCCH format
@ -263,7 +261,6 @@ void dl_harq_entity::dl_harq_process::dl_tb_process::new_grant_dl(mac_interface_
// If data has not yet been successfully decoded
if (!ack) {
// Save dci
cur_grant = grant;

@ -15,13 +15,12 @@
#define Info(fmt, ...) logger.info(fmt, ##__VA_ARGS__)
#define Debug(fmt, ...) logger.debug(fmt, ##__VA_ARGS__)
#include <pthread.h>
#include <string.h>
#include <strings.h>
#include <unistd.h>
#include "srslte/common/log.h"
#include "srslte/common/pcap.h"
#include "srslte/interfaces/ue_phy_interfaces.h"
#include "srsue/hdr/stack/mac/mac.h"
namespace srsue {

@ -16,9 +16,7 @@
#define Debug(fmt, ...) logger.debug(fmt, ##__VA_ARGS__)
#include "srsue/hdr/stack/mac/proc_phr.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srsue/hdr/stack/mac/mac.h"
#include "srsue/hdr/stack/mac/mux.h"
#include "srslte/interfaces/ue_phy_interfaces.h"
namespace srsue {
@ -131,7 +129,6 @@ void phr_proc::step()
bool phr_proc::generate_phr_on_ul_grant(float* phr)
{
if (phr_is_triggered) {
if (phr) {
*phr = phy_h->get_phr();

@ -11,7 +11,8 @@
*/
#include "srsue/hdr/stack/mac/proc_ra.h"
#include "srslte/common/log_helper.h"
#include "srslte/interfaces/ue_phy_interfaces.h"
#include "srslte/interfaces/ue_rrc_interfaces.h"
#include "srsue/hdr/stack/mac/mux.h"
#include <inttypes.h> // for printing uint64_t
#include <stdint.h>
@ -410,7 +411,6 @@ void ra_proc::tb_decoded_ok(const uint8_t cc_idx, const uint32_t tti)
while (rar_pdu_msg.next()) {
if (rar_pdu_msg.get()->has_rapid() && rar_pdu_msg.get()->get_rapid() == sel_preamble) {
rar_received = true;
process_timeadv_cmd(rar_pdu_msg.get()->get_ta_cmd());
@ -437,7 +437,6 @@ void ra_proc::tb_decoded_ok(const uint8_t cc_idx, const uint32_t tti)
// If this is the first successfully received RAR within this procedure, Msg3 is empty
if (mux_unit->msg3_is_empty()) {
// Save transmitted C-RNTI (if any)
transmitted_crnti = rntis->crnti;

@ -16,6 +16,8 @@
#define Debug(fmt, ...) logger.debug(fmt, ##__VA_ARGS__)
#include "srsue/hdr/stack/mac/proc_sr.h"
#include "srslte/interfaces/ue_phy_interfaces.h"
#include "srslte/interfaces/ue_rrc_interfaces.h"
#include "srsue/hdr/stack/mac/proc_ra.h"
namespace srsue {

@ -20,7 +20,6 @@
#include "srslte/common/log.h"
#include "srslte/common/mac_pcap.h"
#include "srslte/common/timers.h"
#include "srslte/interfaces/ue_interfaces.h"
namespace srsue {

@ -12,6 +12,7 @@
#include "srsue/hdr/stack/rrc/rrc_meas.h"
#include "srslte/asn1/rrc/dl_dcch_msg.h"
#include "srslte/interfaces/ue_phy_interfaces.h"
#include "srslte/rrc/rrc_cfg_utils.h"
#include "srsue/hdr/stack/rrc/rrc.h"
@ -346,7 +347,6 @@ void rrc::rrc_meas::var_meas_report_list::generate_report_eutra(meas_results_s*
}
void rrc::rrc_meas::var_meas_report_list::generate_report_interrat(meas_results_s* report, const uint32_t measId)
{
meas_result_cell_list_nr_r15_l& neigh_list = report->meas_result_neigh_cells.set_meas_result_neigh_cell_list_nr_r15();
var_meas_report& var_meas = varMeasReportList.at(measId);
@ -361,7 +361,6 @@ void rrc::rrc_meas::var_meas_report_list::generate_report_interrat(meas_results_
// the following
for (auto& cell : var_meas.cell_triggered_list) {
if (neigh_list.size() <= var_meas.report_cfg_inter.max_report_cells) {
meas_result_cell_nr_r15_s rc = {};
@ -579,7 +578,6 @@ void rrc::rrc_meas::var_meas_cfg::report_triggers_eutra_check_new(int32_t
}
if (new_cell_trigger) {
// include a measurement reporting entry within the VarMeasReportList for this measId (nof_reports reset
// inside) include the concerned cell(s) in the cellsTriggeredList defined within the VarMeasReportList
meas_report->set_measId(meas_id, meas_obj.carrier_freq, report_cfg, cells_triggered_list);
@ -752,7 +750,6 @@ void rrc::rrc_meas::var_meas_cfg::report_triggers()
{
// for each measId included in the measIdList within VarMeasConfig
for (auto& m : measIdList) {
if (!reportConfigList.count(m.second.report_cfg_id) || !measObjectsList.count(m.second.meas_obj_id)) {
logger.error("MEAS: Computing report triggers. MeasId=%d has invalid report or object settings", m.first);
continue;
@ -771,14 +768,12 @@ void rrc::rrc_meas::var_meas_cfg::report_triggers()
if (meas_obj.meas_obj.type().value == meas_obj_to_add_mod_s::meas_obj_c_::types_opts::meas_obj_eutra &&
report_cfg.report_cfg.type().value == report_cfg_to_add_mod_s::report_cfg_c_::types::report_cfg_eutra) {
report_triggers_eutra(m.first, report_cfg.report_cfg.report_cfg_eutra(), meas_obj.meas_obj.meas_obj_eutra());
}
else if (meas_obj.meas_obj.type().value == meas_obj_to_add_mod_s::meas_obj_c_::types_opts::meas_obj_nr_r15 &&
report_cfg.report_cfg.type().value ==
report_cfg_to_add_mod_s::report_cfg_c_::types::report_cfg_inter_rat) {
} else if (meas_obj.meas_obj.type().value == meas_obj_to_add_mod_s::meas_obj_c_::types_opts::meas_obj_nr_r15 &&
report_cfg.report_cfg.type().value ==
report_cfg_to_add_mod_s::report_cfg_c_::types::report_cfg_inter_rat) {
report_triggers_interrat_nr(
m.first, report_cfg.report_cfg.report_cfg_inter_rat(), meas_obj.meas_obj.meas_obj_nr_r15());
}
else {
} else {
logger.error("Unsupported combination of measurement object type %s and report config type %s ",
meas_obj.meas_obj.type().to_string().c_str(),
report_cfg.report_cfg.type().to_string().c_str());
@ -816,7 +811,6 @@ void rrc::rrc_meas::var_meas_cfg::eval_triggers_eutra(uint32_t meas_i
if (report_cfg.trigger_type.type() == report_cfg_eutra_s::trigger_type_c_::types::event) {
// A1 & A2 are for serving cell only
if (event_id.type().value < eutra_event_s::event_id_c_::types::event_a3) {
float thresh = 0.0;
bool enter_condition = false;
bool exit_condition = false;
@ -1017,9 +1011,9 @@ void rrc::rrc_meas::var_meas_cfg::eval_triggers()
report_cfg.report_cfg.type().value == report_cfg_to_add_mod_s::report_cfg_c_::types::report_cfg_eutra) {
eval_triggers_eutra(
m.first, report_cfg.report_cfg.report_cfg_eutra(), meas_obj.meas_obj.meas_obj_eutra(), serv_cell, Ofs, Ocs);
}
else if (meas_obj.meas_obj.type().value == meas_obj_to_add_mod_s::meas_obj_c_::types_opts::meas_obj_nr_r15 &&
report_cfg.report_cfg.type().value == report_cfg_to_add_mod_s::report_cfg_c_::types::report_cfg_inter_rat)
} else if (meas_obj.meas_obj.type().value == meas_obj_to_add_mod_s::meas_obj_c_::types_opts::meas_obj_nr_r15 &&
report_cfg.report_cfg.type().value ==
report_cfg_to_add_mod_s::report_cfg_c_::types::report_cfg_inter_rat)
eval_triggers_interrat_nr(
m.first, report_cfg.report_cfg.report_cfg_inter_rat(), meas_obj.meas_obj.meas_obj_nr_r15());
else {

@ -12,7 +12,9 @@
#include "srsue/hdr/stack/ue_stack_lte.h"
#include "srslte/common/logmap.h"
#include "srslte/interfaces/ue_phy_interfaces.h"
#include "srslte/srslte.h"
#include <algorithm>
#include <chrono>
#include <numeric>

@ -21,7 +21,7 @@
#include "srslte/asn1/liblte_mme.h"
#include "srslte/common/logmap.h"
#include "srslte/interfaces/ue_gw_interfaces.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/interfaces/ue_rrc_interfaces.h"
#include "srslte/interfaces/ue_usim_interfaces.h"
#include "srsue/hdr/stack/upper/nas.h"
#include "srsue/hdr/stack/upper/nas_idle_procedures.h"

@ -11,7 +11,7 @@
*/
#include "srsue/hdr/stack/upper/nas_idle_procedures.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/interfaces/ue_rrc_interfaces.h"
using namespace srslte;

@ -79,7 +79,7 @@ bool usim_base::get_imei_vec(uint8_t* imei_, uint32_t n)
return false;
}
uint64 temp = imei;
uint64_t temp = imei;
for (int i = 14; i >= 0; i--) {
imei_[i] = temp % 10;
temp /= 10;

@ -12,10 +12,8 @@
#include "srslte/asn1/rrc/rr_common.h"
#include "srslte/asn1/rrc_utils.h"
#include "srslte/common/log_filter.h"
#include "srslte/common/mac_pcap.h"
#include "srslte/common/test_common.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/test/ue_test_interfaces.h"
#include "srsue/hdr/stack/mac/mac.h"
#include "srsue/hdr/stack/mac/mux.h"
@ -168,7 +166,6 @@ public:
// Testing methods
int dl_grant(mac* mac_h, bool ack, uint16_t rnti, uint32_t len, const uint8_t* payload)
{
bool ack_v[SRSLTE_MAX_CODEWORDS] = {ack, 0};
mac_interface_phy_lte::tb_action_dl_t dl_action = {};
@ -205,7 +202,6 @@ public:
int rar_and_check(mac* mac_h, bool preamble_matches, uint32_t temp_rnti)
{
// Generate RAR to MAC
uint8_t grant[SRSLTE_RAR_GRANT_LEN] = {1};
@ -243,7 +239,6 @@ public:
bool is_rar = false,
bool adaptive_retx = false)
{
mac_interface_phy_lte::tb_action_ul_t ul_action = {};
mac_interface_phy_lte::mac_grant_ul_t ul_mac_grant = {};
@ -923,7 +918,7 @@ int mac_ul_sch_pdu_with_short_bsr_test()
rlc.write_sdu(1, 10);
// generate TTI
uint32 tti = 0;
uint32_t tti = 0;
stack.run_tti(tti++);
usleep(100);
@ -980,7 +975,7 @@ int mac_ul_sch_pdu_with_short_bsr_zero_test()
rlc.write_sdu(2, 2);
// generate TTI
uint32 tti = 0;
uint32_t tti = 0;
stack.run_tti(tti++);
usleep(100);
@ -1267,7 +1262,7 @@ int mac_ul_sch_regular_bsr_retx_test()
rlc.write_sdu(3, 1000);
// generate TTI
uint32 tti = 0;
uint32_t tti = 0;
stack.run_tti(tti++);
usleep(100);
@ -1432,7 +1427,7 @@ int mac_ul_sch_periodic_bsr_test()
rlc.write_sdu(3, 100);
// generate TTI
uint32 tti = 0;
uint32_t tti = 0;
stack.run_tti(tti++);
usleep(100);
@ -1705,7 +1700,7 @@ int mac_ul_sch_trunc_bsr_test2()
rlc.write_sdu(3, 100);
// generate TTI
uint32 tti = 0;
uint32_t tti = 0;
stack.run_tti(tti++);
usleep(100);
@ -1997,7 +1992,6 @@ int run_mac_ra_test(struct ra_test test, mac* mac, phy_dummy* phy, uint32_t* tti
bool new_prach = false;
for (uint32_t j = 0; j < test.nof_prachs; j++) {
// In the next TTI, a BSR shall be triggered which triggers SR which triggers PRACH
if (test.assume_prach_transmitted != (int)j) {
phy->set_prach_tti(tti + phy->prach_delay);
@ -2048,7 +2042,6 @@ int run_mac_ra_test(struct ra_test test, mac* mac, phy_dummy* phy, uint32_t* tti
// Request Msg3 (re)-transmission
for (uint32_t i = 0; i < test.nof_msg3_retx + 1; i++) {
// Step to contention resolution. Make sure timer does not start until Msg3 is transmitted
// and restarts on every retx
for (int k = 0; k < test.rach_cfg.ra_supervision_info.mac_contention_resolution_timer.to_number() - 2; k++) {
@ -2165,7 +2158,7 @@ int mac_random_access_test()
set_mac_cfg_t_rach_cfg_common(&mac_cfg, rach_cfg);
mac.set_config(mac_cfg);
uint32 tti = 0;
uint32_t tti = 0;
stack.run_tti(tti++); // make sure MAC/PRACH config is applied
// generate config for LCIDs in different LCGs than CCCH

@ -519,7 +519,7 @@ int main(int argc, char** argv)
channel_args.delay_enable = std::isnormal(channel_delay_max_us);
channel_args.delay_min_us = channel_delay_us;
channel_args.delay_max_us = channel_delay_us;
channel_args.delay_period_s = (uint32)channel_period_s;
channel_args.delay_period_s = (uint32_t)channel_period_s;
channel_args.delay_init_time_s = channel_init_time_s;
channel_args.awgn_enable = std::isnormal(channel_snr_db) and (pci == *pcis_to_simulate.begin());
channel_args.awgn_signal_power_dBfs = srslte_enb_dl_get_maximum_signal_power_dBfs(cell.nof_prb);

@ -13,10 +13,11 @@
#ifndef SRSUE_TTCN3_LTE_PHY_H
#define SRSUE_TTCN3_LTE_PHY_H
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/interfaces/ue_phy_interfaces.h"
#include "srsue/hdr/phy/ue_lte_phy_base.h"
#include "srsue/hdr/ue.h"
#include "ttcn3_interfaces.h"
#include <srslte/interfaces/ue_interfaces.h>
#include <srslte/phy/phch/dci.h>
using namespace srsue;

@ -66,7 +66,7 @@ private:
Document document;
if (document.Parse((char*)&rx_buf->at(2)).HasParseError() || document.IsObject() == false) {
logger.error((uint8*)&rx_buf->at(2), json_len, "Error parsing incoming data.");
logger.error((uint8_t*)&rx_buf->at(2), json_len, "Error parsing incoming data.");
return SRSLTE_ERROR;
}

@ -15,6 +15,7 @@
#include "srslte/common/common.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/interfaces/ue_pdcp_interfaces.h"
#include "ttcn3_helpers.h"
// Interfaces used by system interface to communicate with main component
@ -76,8 +77,8 @@ public:
virtual void release_as_security(const ttcn3_helpers::timing_info_t timing, const std::string cell_name) = 0;
virtual ttcn3_helpers::pdcp_count_map_t get_pdcp_count(const std::string cell_name) = 0;
virtual uint32_t get_tti() = 0;
virtual void set_forced_lcid(int lcid) = 0;
virtual uint32_t get_tti() = 0;
virtual void set_forced_lcid(int lcid) = 0;
};
class ss_srb_interface

@ -67,7 +67,7 @@ private:
Document document;
if (document.Parse((char*)&rx_buf->at(2)).HasParseError() || document.IsObject() == false) {
logger.error((uint8*)&rx_buf->at(2), json_len, "Error parsing incoming data.");
logger.error((uint8_t*)&rx_buf->at(2), json_len, "Error parsing incoming data.");
return SRSLTE_ERROR;
}

@ -59,7 +59,7 @@ private:
Document document;
if (document.Parse(json).HasParseError() || document.IsObject() == false) {
logger.error((uint8*)json, json_len, "Error parsing incoming data.");
logger.error((uint8_t*)json, json_len, "Error parsing incoming data.");
return SRSLTE_ERROR;
}

@ -11,26 +11,18 @@
*/
#include "srslte/common/bcd_helpers.h"
#include "srslte/common/log_filter.h"
#include "srslte/common/logger_srslog_wrapper.h"
#include "srslte/common/logmap.h"
#include "srslte/common/test_common.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/interfaces/ue_pdcp_interfaces.h"
#include "srslte/srslog/srslog.h"
#include "srslte/test/ue_test_interfaces.h"
#include "srslte/upper/pdcp.h"
#include "srslte/upper/pdcp_entity_lte.h"
#include "srslte/upper/rlc.h"
#include "srsue/hdr/stack/mac/mac.h"
#include "srsue/hdr/stack/rrc/rrc.h"
#include "srsue/hdr/stack/upper/gw.h"
#include "srsue/hdr/stack/upper/nas.h"
#include "srsue/hdr/stack/upper/usim.h"
#include "srsue/hdr/stack/upper/usim_base.h"
#include <iostream>
using namespace srsue;
using namespace asn1::rrc;
static_assert(alignof(LIBLTE_BYTE_MSG_STRUCT) == alignof(byte_buffer_t),
"liblte buffer and byte buffer members misaligned");

@ -11,7 +11,6 @@
*/
#include "srsue/hdr/stack/upper/pcsc_usim.h"
#include <assert.h>
#include <iostream>
using namespace srsue;
@ -27,11 +26,11 @@ int main(int argc, char** argv)
logger.set_hex_dump_max_size(100000);
srslog::init();
uint8_t res[16];
int res_len;
uint8_t k_asme[32];
uint16 mcc = 0;
uint16 mnc = 0;
uint8_t res[16];
int res_len;
uint8_t k_asme[32];
uint16_t mcc = 0;
uint16_t mnc = 0;
usim_args_t args;
args.pin = "6129";

@ -48,8 +48,8 @@ static uint8_t rand_enb[] =
static uint8_t autn_enb[] =
{0xd7, 0x44, 0x51, 0x9b, 0x25, 0xaa, 0x80, 0x00, 0x84, 0xba, 0x37, 0xb0, 0xf6, 0x73, 0x4d, 0xd1};
static constexpr uint16 mcc = 208;
static constexpr uint16 mnc = 93;
static constexpr uint16_t mcc = 208;
static constexpr uint16_t mnc = 93;
int main(int argc, char** argv)
{

Loading…
Cancel
Save