On Wednesday 07 January 2009 18:15:59 Marc Petit-Huguenin wrote: > The problem seems to be in usrp_rx.cc, line 123: > > d_urx = > boost::any_cast<usrp_standard_rx *>(pmt_any_ref(pmt_nth(1, data))); > > This code throws the following exception: > > exception: boost::bad_any_cast: failed conversion using boost::any_cast
Thanks for pointing me into the right direction - after that, fixing was quite easy, usrp_standard_{rt}x::make has changed its return type. Patch attached. Stefan -- Stefan Brüns / Bergstraße 21 / 52062 Aachen phone: +49 241 53809034 mobile: +49 151 50412019
Index: usrp/host/lib/inband/usrp_rx.h =================================================================== --- usrp/host/lib/inband/usrp_rx.h (revision 10204) +++ usrp/host/lib/inband/usrp_rx.h (working copy) @@ -23,9 +23,8 @@ #include <mblock/mblock.h> #include <fstream> +#include "usrp_standard.h" -class usrp_standard_rx; - extern bool usrp_rx_stop; // used to communicate a 'stop' to the RX stub /*! @@ -34,7 +33,7 @@ class usrp_rx : public mb_mblock { mb_port_sptr d_cs; - usrp_standard_rx *d_urx; + usrp_standard_rx_sptr d_urx; bool d_disk_write; bool d_disk_write_pkt; Index: usrp/host/lib/inband/usrp_tx.h =================================================================== --- usrp/host/lib/inband/usrp_tx.h (revision 10204) +++ usrp/host/lib/inband/usrp_tx.h (working copy) @@ -23,16 +23,15 @@ #include <mblock/mblock.h> #include <fstream> +#include "usrp_standard.h" -class usrp_standard_tx; - /*! * \brief Implements the low level usb interface to the USRP */ class usrp_tx : public mb_mblock { mb_port_sptr d_cs; - usrp_standard_tx *d_utx; + usrp_standard_tx_sptr d_utx; bool d_disk_write; std::ofstream d_ofile; Index: usrp/host/lib/inband/usrp_rx.cc =================================================================== --- usrp/host/lib/inband/usrp_rx.cc (revision 10204) +++ usrp/host/lib/inband/usrp_rx.cc (working copy) @@ -119,8 +119,9 @@ // Need the handle to the RX port to send responses, this is passed // by the USRP interface m-block + pmt_t handle = pmt_nth(1, data); d_urx = - boost::any_cast<usrp_standard_rx *>(pmt_any_ref(pmt_nth(1, data))); + boost::any_cast<usrp_standard_rx_sptr>(pmt_any_ref(handle)); if(verbose) std::cout << "[usrp_rx] Waiting for packets..\n"; Index: usrp/host/lib/inband/usrp_tx.cc =================================================================== --- usrp/host/lib/inband/usrp_tx.cc (revision 10204) +++ usrp/host/lib/inband/usrp_tx.cc (working copy) @@ -100,7 +100,7 @@ pmt_t invocation_handle = pmt_nth(0, data); pmt_t channel = pmt_nth(1, data); pmt_t v_packets = pmt_nth(2, data); - d_utx = boost::any_cast<usrp_standard_tx *>(pmt_any_ref(pmt_nth(3, data))); + d_utx = boost::any_cast<usrp_standard_tx_sptr>(pmt_any_ref(pmt_nth(3, data))); size_t n_bytes; bool underrun; // this will need to go, as it is taken care of in the packet headers
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio