fixed mac_test

master
Francisco Paisana 5 years ago committed by Andre Puschmann
parent 946ead06e8
commit 0f166ce739

@ -328,7 +328,12 @@ public:
class stack_dummy : public stack_interface_mac
{
void process_pdus() final {}
public:
void init(mac* mac_) { mac_h = mac_; }
void process_pdus() final { mac_h->process_pdus(); }
private:
mac* mac_h = nullptr;
};
} // namespace srslte
@ -370,6 +375,7 @@ int mac_unpack_test()
// the actual MAC
mac mac(&mac_log);
stack.init(&mac);
mac.init(&phy, &rlc, &rrc, &timers, &stack);
// create dummy DL action and grant and push MAC PDU
@ -428,6 +434,7 @@ int mac_ul_sch_pdu_test1()
// the actual MAC
mac mac(&mac_log);
stack.init(&mac);
mac.init(&phy, &rlc, &rrc, &timers, &stack);
const uint16_t crnti = 0x1001;
mac.set_ho_rnti(crnti, 0);
@ -497,6 +504,7 @@ int mac_ul_logical_channel_prioritization_test1()
// the actual MAC
mac mac(&mac_log);
stack.init(&mac);
mac.init(&phy, &rlc, &rrc, &timers, &stack);
const uint16_t crnti = 0x1001;
mac.set_ho_rnti(crnti, 0);
@ -611,6 +619,7 @@ int mac_ul_logical_channel_prioritization_test2()
// the actual MAC
mac mac(&mac_log);
stack.init(&mac);
mac.init(&phy, &rlc, &rrc, &timers, &stack);
const uint16_t crnti = 0x1001;
mac.set_ho_rnti(crnti, 0);
@ -712,6 +721,7 @@ int mac_ul_logical_channel_prioritization_test3()
// the actual MAC
mac mac(&mac_log);
stack.init(&mac);
mac.init(&phy, &rlc, &rrc, &timers, &stack);
const uint16_t crnti = 0x1001;
mac.set_ho_rnti(crnti, 0);
@ -801,6 +811,7 @@ int mac_ul_sch_pdu_with_short_bsr_test()
// the actual MAC
mac mac(&mac_log);
stack.init(&mac);
mac.init(&phy, &rlc, &rrc, &timers, &stack);
const uint16_t crnti = 0x1001;
mac.set_ho_rnti(crnti, 0);
@ -888,6 +899,7 @@ int mac_ul_sch_pdu_with_padding_bsr_test()
// the actual MAC
mac mac(&mac_log);
stack.init(&mac);
mac.init(&phy, &rlc, &rrc, &timers, &stack);
const uint16_t crnti = 0x1001;
mac.set_ho_rnti(crnti, 0);
@ -984,6 +996,7 @@ int mac_ul_sch_pdu_one_byte_test()
// the actual MAC
mac mac(&mac_log);
stack.init(&mac);
mac.init(&phy, &rlc, &rrc, &timers, &stack);
const uint16_t crnti = 0x1001;
mac.set_ho_rnti(crnti, 0);
@ -1045,6 +1058,7 @@ int mac_ul_sch_pdu_two_byte_test()
// the actual MAC
mac mac(&mac_log);
stack.init(&mac);
mac.init(&phy, &rlc, &rrc, &timers, &stack);
const uint16_t crnti = 0x1001;
mac.set_ho_rnti(crnti, 0);
@ -1106,6 +1120,7 @@ int mac_ul_sch_pdu_three_byte_test()
// the actual MAC
mac mac(&mac_log);
stack.init(&mac);
mac.init(&phy, &rlc, &rrc, &timers, &stack);
const uint16_t crnti = 0x1001;
mac.set_ho_rnti(crnti, 0);
@ -1360,6 +1375,7 @@ int mac_random_access_test()
// Configure MAC
mac mac(&mac_log);
stack.init(&mac);
mac.init(&phy, &rlc, &rrc, &timers, &stack);
srslte::mac_cfg_t mac_cfg;
set_mac_cfg_t_rach_cfg_common(&mac_cfg, rach_cfg);

Loading…
Cancel
Save