Revision 9d1423b9 usrp/host/apps-inband/test_usrp_inband_rx.cc

b/usrp/host/apps-inband/test_usrp_inband_rx.cc
87 87
test_usrp_rx::test_usrp_rx(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg)
88 88
  : mb_mblock(runtime, instance_name, user_arg),
89 89
    d_samples_recvd(0),
90
    d_samples_to_recv(5e6)
90
    d_samples_to_recv(20e6)
91 91
{ 
92
  
93 92
  d_rx = define_port("rx0", "usrp-rx", false, mb_port::INTERNAL);
94 93
  d_cs = define_port("cs", "usrp-server-cs", false, mb_port::INTERNAL);
95 94
  
96 95
  // Pass a dictionary to usrp_server which specifies which interface to use, the stub or USRP
97 96
  pmt_t usrp_dict = pmt_make_dict();
97
  
98
  // To test the application without a USRP
99
  bool fake_usrp_p = false;
100
  if(fake_usrp_p) {
101
    pmt_dict_set(usrp_dict, 
102
                 pmt_intern("fake-usrp"),
103
		             PMT_T);
104
  }
98 105

99 106
  // Specify the RBF to use
100 107
  pmt_dict_set(usrp_dict,
101 108
               pmt_intern("rbf"),
102
               pmt_intern("nanocell9.rbf"));
109
               pmt_intern("inband_1rxhb_1tx.rbf"));
103 110

104 111
  pmt_dict_set(usrp_dict,
105 112
               pmt_intern("decim-rx"),
106
               pmt_from_long(128));
113
               pmt_from_long(64));
107 114

108 115
  define_component("server", "usrp_server", usrp_dict);
109 116

......
264 271
void
265 272
test_usrp_rx::close_usrp()
266 273
{
274

267 275
  d_cs->send(s_cmd_close, pmt_list1(PMT_NIL));
268 276
  d_state = CLOSING_USRP;
269 277
  
......
302 310
  pmt_t status = pmt_nth(1, data);
303 311
  pmt_t v_samples = pmt_nth(2, data);
304 312
  pmt_t timestamp = pmt_nth(3, data);
305
  pmt_t properties = pmt_nth(4, data);
313
  pmt_t channel = pmt_nth(4, data);
314
  pmt_t properties = pmt_nth(5, data);
306 315

307 316
  d_samples_recvd += pmt_length(v_samples) / 4;
308 317

......
325 334
test_usrp_rx::enter_closing_channel()
326 335
{
327 336
  d_state = CLOSING_CHANNEL;
328
  
329
  sleep(2);
330
  
337

331 338
  d_rx->send(s_cmd_deallocate_channel, pmt_list2(PMT_NIL, d_rx_chan));
332 339
  
333 340
  if(verbose)
......
342 349
int
343 350
main (int argc, char **argv)
344 351
{
345
  // handle any command line args here
346

347 352
  mb_runtime_sptr rt = mb_make_runtime();
348 353
  pmt_t result = PMT_NIL;
349 354

350 355
  rt->run("top", "test_usrp_rx", PMT_F, &result);
356

351 357
}

Also available in: Unified diff