fix segfault in UE PHY tests

- added dummy rrc class to UE phy tests
This commit is contained in:
Andre Puschmann 2017-07-24 18:10:31 +02:00
parent 00be4a5de7
commit 32b3046d0f
2 changed files with 20 additions and 4 deletions

View File

@ -199,6 +199,14 @@ srslte_softbuffer_tx_t softbuffer_tx;
uint16_t temp_c_rnti;
class rrc_dummy : public srsue::rrc_interface_phy
{
public:
void in_sync() {};
void out_of_sync() {};
};
/******** MAC Interface implementation */
class testmac : public srsue::mac_interface_phy
{
@ -326,7 +334,8 @@ private:
testmac my_mac;
srslte::radio_multi radio;
srslte::radio_multi radio;
rrc_dummy rrc_dummy;
int main(int argc, char *argv[])
{
@ -336,7 +345,7 @@ int main(int argc, char *argv[])
// Init Radio and PHY
radio.init();
my_phy.init(&radio, &my_mac, NULL, &log);
my_phy.init(&radio, &my_mac, &rrc_dummy, &log);
if (prog_args.rf_rx_gain > 0 && prog_args.rf_tx_gain > 0) {
radio.set_rx_gain(prog_args.rf_rx_gain);
radio.set_tx_gain(prog_args.rf_tx_gain);

View File

@ -90,6 +90,13 @@ uint32_t total_oks=0;
uint8_t payload[1024];
srslte_softbuffer_rx_t softbuffer;
class rrc_dummy : public srsue::rrc_interface_phy
{
public:
void in_sync() {};
void out_of_sync() {};
};
/******** MAC Interface implementation */
class testmac : public srsue::mac_interface_phy
{
@ -147,7 +154,7 @@ public:
testmac my_mac;
srslte::radio_multi radio;
rrc_dummy rrc_dummy;
@ -159,7 +166,7 @@ int main(int argc, char *argv[])
// Init Radio and PHY
radio.init();
my_phy.init(&radio, &my_mac, NULL, &log);
my_phy.init(&radio, &my_mac, &rrc_dummy, &log);
if (prog_args.rf_gain > 0) {
radio.set_rx_gain(prog_args.rf_gain);
} else {