[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r9951 - gnuradio/branches/developers/eb/cppdb-wip/usrp
From: |
eb |
Subject: |
[Commit-gnuradio] r9951 - gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy |
Date: |
Thu, 6 Nov 2008 23:39:10 -0700 (MST) |
Author: eb
Date: 2008-11-06 23:39:10 -0700 (Thu, 06 Nov 2008)
New Revision: 9951
Modified:
gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy/usrp_basic.cc
gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy/usrp_basic.h
gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy/usrp_standard.cc
Log:
more work-in-progress
Modified:
gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy/usrp_basic.cc
===================================================================
---
gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy/usrp_basic.cc
2008-11-07 06:23:24 UTC (rev 9950)
+++
gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy/usrp_basic.cc
2008-11-07 06:39:10 UTC (rev 9951)
@@ -164,6 +164,16 @@
usb_close (d_udh);
}
+void
+usrp_basic::init_db(usrp_basic_sptr u)
+{
+ if (u.get() != this)
+ throw std::invalid_argument("u is not this");
+
+ d_db[0] = instantiate_dbs(d_dbid[0], u, 0);
+ d_db[1] = instantiate_dbs(d_dbid[1], u, 1);
+}
+
std::vector<db_base_sptr>
usrp_basic::db(int which_side)
{
@@ -751,7 +761,7 @@
set_dc_offset_cl_enable(0xf, 0xf); // enable DC offset removal control
loops
probe_rx_slots (false);
- // FIXME
+
//d_db[0] = instantiate_dbs(d_dbid[0], this, 0);
//d_db[1] = instantiate_dbs(d_dbid[1], this, 1);
@@ -1158,7 +1168,7 @@
set_fpga_tx_sample_rate_divisor (4); // we're using interp x4
probe_tx_slots (false);
- // FIXME
+
//d_db[0] = instantiate_dbs(d_dbid[0], this, 0);
//d_db[1] = instantiate_dbs(d_dbid[1], this, 1);
Modified:
gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy/usrp_basic.h
===================================================================
--- gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy/usrp_basic.h
2008-11-07 06:23:24 UTC (rev 9950)
+++ gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy/usrp_basic.h
2008-11-07 06:39:10 UTC (rev 9951)
@@ -80,6 +80,10 @@
*/
std::vector< std::vector<db_base_sptr> > d_db;
+ //! One time call, made only only from usrp_standard_*::make after
shared_ptr is created.
+ void init_db(usrp_basic_sptr u);
+
+
usrp_basic (int which_board,
struct usb_dev_handle *open_interface (struct usb_device *dev),
const std::string fpga_filename = "",
Modified:
gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy/usrp_standard.cc
===================================================================
---
gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy/usrp_standard.cc
2008-11-07 06:23:24 UTC (rev 9950)
+++
gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy/usrp_standard.cc
2008-11-07 06:39:10 UTC (rev 9951)
@@ -220,10 +220,13 @@
)
{
try {
- return usrp_standard_rx_sptr(new usrp_standard_rx(which_board, decim_rate,
- nchan, mux, mode,
- fusb_block_size,
fusb_nblocks,
- fpga_filename,
firmware_filename));
+ usrp_standard_rx_sptr u =
+ usrp_standard_rx_sptr(new usrp_standard_rx(which_board, decim_rate,
+ nchan, mux, mode,
+ fusb_block_size, fusb_nblocks,
+ fpga_filename,
firmware_filename));
+ u->init_db(u);
+ return u;
}
catch (...){
return usrp_standard_rx_sptr();
@@ -593,9 +596,12 @@
)
{
try {
- return usrp_standard_tx_sptr(new usrp_standard_tx(which_board,
interp_rate, nchan, mux,
- fusb_block_size,
fusb_nblocks,
- fpga_filename,
firmware_filename));
+ usrp_standard_tx_sptr u =
+ usrp_standard_tx_sptr(new usrp_standard_tx(which_board, interp_rate,
nchan, mux,
+ fusb_block_size, fusb_nblocks,
+ fpga_filename,
firmware_filename));
+ u->init_db(u);
+ return u;
}
catch (...){
return usrp_standard_tx_sptr();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r9951 - gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy,
eb <=