Usrp全双工操作

时间:2016-01-20 17:44:16

标签: c++ usrp

我有一个带有WBX子板的USRP N200。我需要一个简单的C / C ++ 可以同时接收和发送的程序。但我无法找到它。

1 个答案:

答案 0 :(得分:2)

查看示例that come with UHDtxrx loopback example就是这样做的。

从本质上讲,它并不复杂:

  1. 产生一个用于接收的线程和一个用于传输的线程。这是可选的,但它会使您的系统更不容易接收样本过量或传输样本欠载。
  2. 创建2016-01-20 11:10:48.841 INFO 12769 --- [http-nio-8081-exec-1] i.StatisticalLoggingSessionEventListener : Session Metrics { 66145 nanoseconds spent acquiring 1 JDBC connections; 0 nanoseconds spent releasing 0 JDBC connections; 6081355 nanoseconds spent preparing 212 JDBC statements; 14977371 nanoseconds spent executing 212 JDBC statements; 0 nanoseconds spent executing 0 JDBC batches; 0 nanoseconds spent performing 0 L2C puts; 0 nanoseconds spent performing 0 L2C hits; 0 nanoseconds spent performing 0 L2C misses; 0 nanoseconds spent executing 0 flushes (flushing a total of 0 entities and 0 collections); 0 nanoseconds spent executing 0 partial-flushes (flushing a total of 0 entities and 0 collections) } rx_streamer
  3. 在RX线程中,重复调用TX线程tx_streamer方法中的rx_streamer->recv()方法。