Simultanuous receive and transmit on USRP2 in C++, maybe use threads

Hi All,

I am building an application where I simultanuously want to receive and
transmit using the USRP2.
Since I also need the timestamps, I implement this using C++.
(Building my own filewriter class which extends usrp2::rx_nop_handler,
like in rx_streaming_samples.cc)

Should I use threads to keep TX and RX from interfering with each other.
With threads I could just start the RX thread and TX thread.
If I don’t use threads I have to interleave sending and receiving
packets.

Is there an example I could look at.

I now based my code on :
usrp2/host/apps/rx_streaming_samples.cc
and
usrp2/host/apps/tx_samples.cc

I know gnuradio has its own support code for threads, but I couldn’t
find an easy example on how to use it.

Best Regards,

Martin

On Tue, Mar 09, 2010 at 02:34:32AM +0100, Martin DvH wrote:

If I don’t use threads I have to interleave sending and receiving
I know gnuradio has its own support code for threads, but I couldn’t
find an easy example on how to use it.

Martin,

We just build everything on top of boost::thread and
gruel::thread_group (boost bug fixes) . It’s pretty straight-forward.
The boost docs will give you the details.

Eric