[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r7744 - in gnuradio/branches/developers/gnychis/inband
From: |
gnychis |
Subject: |
[Commit-gnuradio] r7744 - in gnuradio/branches/developers/gnychis/inband/usrp: fpga/rbf host/lib/inband |
Date: |
Tue, 19 Feb 2008 11:52:28 -0700 (MST) |
Author: gnychis
Date: 2008-02-19 11:52:28 -0700 (Tue, 19 Feb 2008)
New Revision: 7744
Modified:
gnuradio/branches/developers/gnychis/inband/usrp/fpga/rbf/Makefile.am
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_rx.cc
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_rx.h
Log:
Forgot to add the RBFs into the Makefile to be installed
Creating two separate file dumps for each data channel, which makes it easier to
parse data from one or the other channel.
Modified: gnuradio/branches/developers/gnychis/inband/usrp/fpga/rbf/Makefile.am
===================================================================
--- gnuradio/branches/developers/gnychis/inband/usrp/fpga/rbf/Makefile.am
2008-02-19 18:36:10 UTC (rev 7743)
+++ gnuradio/branches/developers/gnychis/inband/usrp/fpga/rbf/Makefile.am
2008-02-19 18:52:28 UTC (rev 7744)
@@ -27,9 +27,11 @@
rev2/std_2rxhb_2tx.rbf \
rev2/std_4rx_0tx.rbf \
rev2/std_inband.rbf \
+ rev2/std_inband_dual.rbf \
rev4/std_2rxhb_2tx.rbf \
rev4/std_4rx_0tx.rbf \
rev4/std_inband.rbf \
+ rev4/std_inband_dual.rbf \
rev2/multi_2rxhb_2tx.rbf \
rev4/multi_2rxhb_2tx.rbf
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-19 18:36:10 UTC (rev 7743)
+++ gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_rx.cc
2008-02-19 18:52:28 UTC (rev 7744)
@@ -44,13 +44,14 @@
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_pkt(true) // if true, writes full packet, else just the
payload
+ d_disk_write(true),
+ d_disk_write_pkt(false) // if true, writes full packet, else just the
payload
{
d_cs = define_port("cs", "usrp-rx-cs", true, mb_port::EXTERNAL);
if(d_disk_write) {
- d_ofile.open("rx_data.dat",std::ios::binary|std::ios::out);
+ d_ofile0.open("rx_data_chan0.dat",std::ios::binary|std::ios::out);
+ d_ofile1.open("rx_data_chan1.dat",std::ios::binary|std::ios::out);
d_cs_ofile.open("rx_cs.dat",std::ios::binary|std::ios::out);
}
@@ -61,7 +62,8 @@
usrp_rx::~usrp_rx()
{
if(d_disk_write) {
- d_ofile.close();
+ d_ofile0.close();
+ d_ofile1.close();
d_cs_ofile.close();
}
}
@@ -151,14 +153,22 @@
if(pkt->chan() == CONTROL_CHAN)
d_cs_ofile.write((const char *)pkt, transport_pkt::max_pkt_size());
else {
- if(d_disk_write_pkt)
- d_ofile.write((const char *)pkt, transport_pkt::max_pkt_size());
- else
- d_ofile.write((const char *)pkt->payload(),
transport_pkt::max_payload());
+ if(d_disk_write_pkt) {
+ if(pkt->chan() == 0)
+ d_ofile0.write((const char *)pkt, transport_pkt::max_pkt_size());
+ else if(pkt->chan() == 1)
+ d_ofile1.write((const char *)pkt, transport_pkt::max_pkt_size());
+ } else {
+ if(pkt->chan() == 0)
+ d_ofile0.write((const char *)pkt->payload(),
transport_pkt::max_payload());
+ else if(pkt->chan() == 1)
+ d_ofile1.write((const char *)pkt->payload(),
transport_pkt::max_payload());
+ }
}
d_cs_ofile.flush();
- d_ofile.flush();
+ d_ofile0.flush();
+ d_ofile1.flush();
}
}
Modified:
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_rx.h
===================================================================
--- gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_rx.h
2008-02-19 18:36:10 UTC (rev 7743)
+++ gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_rx.h
2008-02-19 18:52:28 UTC (rev 7744)
@@ -38,7 +38,8 @@
bool d_disk_write;
bool d_disk_write_pkt;
- std::ofstream d_ofile;
+ std::ofstream d_ofile0;
+ std::ofstream d_ofile1;
std::ofstream d_cs_ofile;
public:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r7744 - in gnuradio/branches/developers/gnychis/inband/usrp: fpga/rbf host/lib/inband,
gnychis <=