[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r5817 - gnuradio/branches/developers/gnychis/inband/us
From: |
gnychis |
Subject: |
[Commit-gnuradio] r5817 - gnuradio/branches/developers/gnychis/inband/usrp/host/apps |
Date: |
Sat, 23 Jun 2007 09:11:53 -0600 (MDT) |
Author: gnychis
Date: 2007-06-23 09:11:53 -0600 (Sat, 23 Jun 2007)
New Revision: 5817
Modified:
gnuradio/branches/developers/gnychis/inband/usrp/host/apps/test_usrp_inband_rx.cc
Log:
Adding a disk write flag for test_usrp_inband_rx
Modified:
gnuradio/branches/developers/gnychis/inband/usrp/host/apps/test_usrp_inband_rx.cc
===================================================================
---
gnuradio/branches/developers/gnychis/inband/usrp/host/apps/test_usrp_inband_rx.cc
2007-06-23 15:10:08 UTC (rev 5816)
+++
gnuradio/branches/developers/gnychis/inband/usrp/host/apps/test_usrp_inband_rx.cc
2007-06-23 15:11:53 UTC (rev 5817)
@@ -72,6 +72,8 @@
mb_port_sptr d_cs;
pmt_t d_rx_chan; // returned tx channel handle
+ bool d_disk_write;
+
enum state_t {
INIT,
OPENING_USRP,
@@ -103,7 +105,8 @@
};
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)
+ : mb_mblock(runtime, instance_name, user_arg),
+ d_disk_write(false)
{
d_rx = define_port("rx0", "usrp-rx", false, mb_port::INTERNAL);
@@ -111,6 +114,8 @@
bool fake_usrp_p = true;
//bool fake_usrp_p = false;
+
+ //d_disk_write = true;
// Test the TX side
@@ -127,12 +132,14 @@
connect("self", "rx0", "server", "rx0");
connect("self", "cs", "server", "cs");
- d_ofile.open("pdump_rx.dat",std::ios::binary|std::ios::out);
+ if(d_disk_write)
+ d_ofile.open("pdump_rx.dat",std::ios::binary|std::ios::out);
}
test_usrp_rx::~test_usrp_rx()
{
- d_ofile.close();
+ if(d_disk_write)
+ d_ofile.close();
}
void
@@ -290,8 +297,10 @@
size_t n_bytes;
const char *samples = (const char *) pmt_uniform_vector_elements(v_samples,
n_bytes);
- d_ofile.write(samples, n_bytes);
+ if(d_disk_write)
+ d_ofile.write(samples, n_bytes);
+
if(verbose)
std::cout << ".";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r5817 - gnuradio/branches/developers/gnychis/inband/usrp/host/apps,
gnychis <=