diff --git a/lib/src/mac/pdu.cc b/lib/src/mac/pdu.cc index 4966ce601..82e4f000c 100644 --- a/lib/src/mac/pdu.cc +++ b/lib/src/mac/pdu.cc @@ -16,7 +16,11 @@ #include #include "srslte/mac/pdu.h" -#include "srslte/srslte.h" + +extern "C" { +#include "srslte/phy/utils/bit.h" +#include "srslte/phy/utils/vector.h" +} // Table 6.1.3.1-1 Buffer size levels for BSR static uint32_t btable[64] = { @@ -466,7 +470,7 @@ int sch_pdu::get_sdu_space() } else { ret = rem_len - (size_header_sdu(subheaders[last_sdu_idx].get_payload_size()) - 1) - 1; } - ret = SRSLTE_MIN(ret >= 0 ? ret : 0, buffer_tx->get_tailroom()); + ret = std::min(ret >= 0 ? ret : 0u, buffer_tx->get_tailroom()); return ret; } diff --git a/lib/test/mac/pdu_test.cc b/lib/test/mac/pdu_test.cc index d7bf3c10c..1c21b5afd 100644 --- a/lib/test/mac/pdu_test.cc +++ b/lib/test/mac/pdu_test.cc @@ -16,7 +16,11 @@ #include "srslte/common/mac_pcap.h" #include "srslte/common/test_common.h" #include "srslte/mac/pdu.h" -#include "srslte/srslte.h" + +extern "C" { +#include "srslte/phy/phch/dci.h" +} + #include #include #include @@ -162,7 +166,7 @@ class rlc_dummy : public srslte::read_pdu_interface public: int read_pdu(uint32_t lcid, uint8_t* payload, uint32_t nof_bytes) { - uint32_t len = SRSLTE_MIN(ul_queues[lcid], nof_bytes); + uint32_t len = std::min(ul_queues[lcid], nof_bytes); // set payload bytes to LCID so we can check later if the scheduling was correct memset(payload, lcid, len); diff --git a/srsenb/hdr/phy/phy_ue_db.h b/srsenb/hdr/phy/phy_ue_db.h index 9d676ead4..1be9aa9bb 100644 --- a/srsenb/hdr/phy/phy_ue_db.h +++ b/srsenb/hdr/phy/phy_ue_db.h @@ -19,7 +19,6 @@ #include #include #include -#include namespace srsenb { diff --git a/srsenb/hdr/stack/upper/gtpu.h b/srsenb/hdr/stack/upper/gtpu.h index d69bf8aa9..9f897fa8d 100644 --- a/srsenb/hdr/stack/upper/gtpu.h +++ b/srsenb/hdr/stack/upper/gtpu.h @@ -18,8 +18,10 @@ #include "srslte/common/logmap.h" #include "srslte/common/threads.h" #include "srslte/interfaces/enb_gtpu_interfaces.h" +#include "srslte/phy/common/phy_common.h" #include "srslte/srslog/srslog.h" -#include "srslte/srslte.h" + +#include #ifndef SRSENB_GTPU_H #define SRSENB_GTPU_H diff --git a/srsenb/src/enb_cfg_parser.cc b/srsenb/src/enb_cfg_parser.cc index ba5a60b03..ecf64f78a 100644 --- a/srsenb/src/enb_cfg_parser.cc +++ b/srsenb/src/enb_cfg_parser.cc @@ -11,12 +11,10 @@ */ #include "enb_cfg_parser.h" -#include "srsenb/hdr/cfg_parser.h" #include "srsenb/hdr/enb.h" #include "srslte/asn1/rrc_utils.h" #include "srslte/common/multiqueue.h" #include "srslte/phy/common/phy_common.h" -#include "srslte/srslte.h" #include #define HANDLEPARSERCODE(cond) \ diff --git a/srsenb/src/stack/enb_stack_lte.cc b/srsenb/src/stack/enb_stack_lte.cc index 32fc1c2b5..ad45e2a76 100644 --- a/srsenb/src/stack/enb_stack_lte.cc +++ b/srsenb/src/stack/enb_stack_lte.cc @@ -13,8 +13,7 @@ #include "srsenb/hdr/stack/enb_stack_lte.h" #include "srsenb/hdr/enb.h" #include "srslte/common/network_utils.h" -#include "srslte/srslte.h" -#include +#include "srslte/interfaces/enb_metrics_interface.h" using namespace srslte; diff --git a/srsenb/src/stack/mac/sched.cc b/srsenb/src/stack/mac/sched.cc index f2f4cc537..07e8487bc 100644 --- a/srsenb/src/stack/mac/sched.cc +++ b/srsenb/src/stack/mac/sched.cc @@ -18,7 +18,6 @@ #include "srsenb/hdr/stack/mac/sched_helpers.h" #include "srslte/common/logmap.h" #include "srslte/srslog/srslog.h" -#include "srslte/srslte.h" #define Console(fmt, ...) srslte::console(fmt, ##__VA_ARGS__) #define Error(fmt, ...) srslog::fetch_basic_logger("MAC").error(fmt, ##__VA_ARGS__) diff --git a/srsenb/src/stack/mac/sched_ue.cc b/srsenb/src/stack/mac/sched_ue.cc index 1037220be..5c13f2aa3 100644 --- a/srsenb/src/stack/mac/sched_ue.cc +++ b/srsenb/src/stack/mac/sched_ue.cc @@ -17,7 +17,6 @@ #include "srsenb/hdr/stack/mac/sched_ue.h" #include "srslte/common/log_helper.h" #include "srslte/common/logmap.h" -#include "srslte/srslte.h" using srslte::tti_interval; diff --git a/srsenb/src/stack/mac/sched_ue_ctrl/sched_harq.cc b/srsenb/src/stack/mac/sched_ue_ctrl/sched_harq.cc index c61a753e3..f628c92e0 100644 --- a/srsenb/src/stack/mac/sched_ue_ctrl/sched_harq.cc +++ b/srsenb/src/stack/mac/sched_ue_ctrl/sched_harq.cc @@ -15,7 +15,6 @@ #include "srsenb/hdr/stack/mac/sched.h" #include "srslte/common/log_helper.h" #include "srslte/mac/pdu.h" -#include "srslte/srslte.h" using srslte::tti_point; diff --git a/srsenb/src/stack/rrc/rrc.cc b/srsenb/src/stack/rrc/rrc.cc index dcc89857d..78a5fd28f 100644 --- a/srsenb/src/stack/rrc/rrc.cc +++ b/srsenb/src/stack/rrc/rrc.cc @@ -21,7 +21,6 @@ #include "srslte/interfaces/enb_pdcp_interfaces.h" #include "srslte/interfaces/enb_rlc_interfaces.h" #include "srslte/interfaces/sched_interface.h" -#include "srslte/srslte.h" using srslte::byte_buffer_t; using srslte::uint32_to_uint8; diff --git a/srsenb/test/mac/sched_test_rand.cc b/srsenb/test/mac/sched_test_rand.cc index 9724e9dc3..707a491f4 100644 --- a/srsenb/test/mac/sched_test_rand.cc +++ b/srsenb/test/mac/sched_test_rand.cc @@ -17,7 +17,6 @@ #include #include #include -#include #include #include "srslte/common/log_filter.h" diff --git a/srsenb/test/phy/enb_phy_test.cc b/srsenb/test/phy/enb_phy_test.cc index 2cfe6cb81..ac207f4f5 100644 --- a/srsenb/test/phy/enb_phy_test.cc +++ b/srsenb/test/phy/enb_phy_test.cc @@ -10,6 +10,10 @@ * */ +#include "srslte/common/threads.h" +#include "srslte/phy/common/phy_common.h" +#include "srslte/phy/utils/random.h" +#include "srslte/srslog/srslog.h" #include #include #include @@ -19,12 +23,7 @@ #include #include #include -#include -#include #include -#include -#include -#include static inline bool dl_ack_value(uint32_t ue_cc_idx, uint32_t tti) { diff --git a/srsenb/test/upper/rrc_mobility_test.cc b/srsenb/test/upper/rrc_mobility_test.cc index c945d08b6..ce785d1d9 100644 --- a/srsenb/test/upper/rrc_mobility_test.cc +++ b/srsenb/test/upper/rrc_mobility_test.cc @@ -17,7 +17,6 @@ #include "srslte/common/test_common.h" #include "test_helpers.h" #include -#include using namespace asn1::rrc; diff --git a/srsue/src/stack/ue_stack_lte.cc b/srsue/src/stack/ue_stack_lte.cc index e783bc894..16aa2a8c7 100644 --- a/srsue/src/stack/ue_stack_lte.cc +++ b/srsue/src/stack/ue_stack_lte.cc @@ -13,7 +13,6 @@ #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 #include diff --git a/srsue/test/upper/gw_test.cc b/srsue/test/upper/gw_test.cc index b6d472525..4a5958f4f 100644 --- a/srsue/test/upper/gw_test.cc +++ b/srsue/test/upper/gw_test.cc @@ -10,14 +10,14 @@ * */ -#include "srslte/common/log.h" #include "srslte/common/logger_srslog_wrapper.h" #include "srslte/common/test_common.h" #include "srslte/interfaces/ue_pdcp_interfaces.h" #include "srslte/srslog/srslog.h" -#include "srslte/srslte.h" #include "srsue/hdr/stack/upper/gw.h" +#include + class test_stack_dummy : public srsue::stack_interface_gw { public: