[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r7688 - in gnuradio/branches/developers/gnychis/inband
From: |
gnychis |
Subject: |
[Commit-gnuradio] r7688 - in gnuradio/branches/developers/gnychis/inband/usrp/host: apps-inband lib/inband |
Date: |
Thu, 14 Feb 2008 13:59:17 -0700 (MST) |
Author: gnychis
Date: 2008-02-14 13:59:16 -0700 (Thu, 14 Feb 2008)
New Revision: 7688
Modified:
gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/test_usrp_inband_2rx.cc
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_rx.cc
Log:
Work in progress on testing dual rx
Modified:
gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/test_usrp_inband_2rx.cc
===================================================================
---
gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/test_usrp_inband_2rx.cc
2008-02-14 20:19:47 UTC (rev 7687)
+++
gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/test_usrp_inband_2rx.cc
2008-02-14 20:59:16 UTC (rev 7688)
@@ -51,7 +51,7 @@
{
mb_port_sptr d_rx;
mb_port_sptr d_cs;
- pmt_t d_rx_chan; // returned tx channel handle
+ pmt_t d_rx_chan0, d_rx_chan1;
enum state_t {
INIT,
@@ -88,6 +88,7 @@
test_usrp_rx::test_usrp_rx(mb_runtime *runtime, const std::string
&instance_name, pmt_t user_arg)
: mb_mblock(runtime, instance_name, user_arg),
+ d_rx_chan0(PMT_NIL), d_rx_chan1(PMT_NIL),
d_samples_recvd(0),
d_samples_to_recv(20e6)
{
@@ -108,7 +109,7 @@
// Specify the RBF to use
pmt_dict_set(usrp_dict,
pmt_intern("rbf"),
- pmt_intern("std_inband.rbf"));
+ pmt_intern("dual2.rbf"));
pmt_dict_set(usrp_dict,
pmt_intern("decim-rx"),
@@ -165,9 +166,12 @@
case ALLOCATING_CHANNEL:
if (pmt_eq(event, s_response_allocate_channel)){
status = pmt_nth(1, data);
- d_rx_chan = pmt_nth(2, data);
+ if(pmt_eqv(d_rx_chan0, PMT_NIL))
+ d_rx_chan0 = pmt_nth(2, data);
+ else
+ d_rx_chan1 = pmt_nth(2, data);
- if (pmt_eq(status, PMT_T)){
+ if (pmt_eq(status, PMT_T) && !pmt_eqv(d_rx_chan1, PMT_NIL)){
enter_receiving();
return;
}
@@ -286,6 +290,7 @@
{
long capacity = (long) 16e6;
d_rx->send(s_cmd_allocate_channel, pmt_list2(PMT_T,
pmt_from_long(capacity)));
+ d_rx->send(s_cmd_allocate_channel, pmt_list2(PMT_T,
pmt_from_long(capacity)));
d_state = ALLOCATING_CHANNEL;
if(verbose)
@@ -299,7 +304,7 @@
d_rx->send(s_cmd_start_recv_raw_samples,
pmt_list2(PMT_F,
- d_rx_chan));
+ d_rx_chan0));
if(verbose)
std::cout << "[TEST_USRP_INBAND_RX] Receiving...\n";
@@ -324,7 +329,7 @@
// Check if the number samples we have received meets the test
if(d_samples_recvd >= d_samples_to_recv) {
- d_rx->send(s_cmd_stop_recv_raw_samples, pmt_list2(PMT_NIL, d_rx_chan));
+ d_rx->send(s_cmd_stop_recv_raw_samples, pmt_list2(PMT_NIL, d_rx_chan0));
enter_closing_channel();
return;
}
@@ -336,7 +341,7 @@
{
d_state = CLOSING_CHANNEL;
- d_rx->send(s_cmd_deallocate_channel, pmt_list2(PMT_NIL, d_rx_chan));
+ d_rx->send(s_cmd_deallocate_channel, pmt_list2(PMT_NIL, d_rx_chan0));
if(verbose)
std::cout << "[TEST_USRP_INBAND_RX] Deallocating RX channel\n";
Modified:
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_rx.cc
===================================================================
--- gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_rx.cc
2008-02-14 20:19:47 UTC (rev 7687)
+++ gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_rx.cc
2008-02-14 20:59:16 UTC (rev 7688)
@@ -44,7 +44,7 @@
usrp_rx::usrp_rx(mb_runtime *rt, const std::string &instance_name, pmt_t
user_arg)
: mb_mblock(rt, instance_name, user_arg),
- d_disk_write(false),
+ d_disk_write(true),
d_disk_write_pkt(true) // if true, writes full packet, else just the
payload
{
d_cs = define_port("cs", "usrp-rx-cs", true, mb_port::EXTERNAL);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r7688 - in gnuradio/branches/developers/gnychis/inband/usrp/host: apps-inband lib/inband,
gnychis <=