commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r5639 - gnuradio/branches/developers/eb/ibu/usrp/host/


From: eb
Subject: [Commit-gnuradio] r5639 - gnuradio/branches/developers/eb/ibu/usrp/host/lib/inband
Date: Sun, 3 Jun 2007 13:20:21 -0600 (MDT)

Author: eb
Date: 2007-06-03 13:20:21 -0600 (Sun, 03 Jun 2007)
New Revision: 5639

Modified:
   gnuradio/branches/developers/eb/ibu/usrp/host/lib/inband/usrp_interface.mbh
   gnuradio/branches/developers/eb/ibu/usrp/host/lib/inband/usrp_server.cc
   
gnuradio/branches/developers/eb/ibu/usrp/host/lib/inband/usrp_usb_interface.cc
   
gnuradio/branches/developers/eb/ibu/usrp/host/lib/inband/usrp_usb_interface_stub.cc
Log:
removing n-bytes from the low level write messages

Modified: 
gnuradio/branches/developers/eb/ibu/usrp/host/lib/inband/usrp_interface.mbh
===================================================================
--- gnuradio/branches/developers/eb/ibu/usrp/host/lib/inband/usrp_interface.mbh 
2007-06-03 18:48:52 UTC (rev 5638)
+++ gnuradio/branches/developers/eb/ibu/usrp/host/lib/inband/usrp_interface.mbh 
2007-06-03 19:20:21 UTC (rev 5639)
@@ -38,7 +38,7 @@
    (cmd-usrp-close invocation-handle)
    (cmd-usrp-ntx-chan invocation-handle)
    (cmd-usrp-nrx-chan invocation-handle)
-   (cmd-usrp-write invocation-handle channel data n-bytes)
+   (cmd-usrp-write invocation-handle channel data)
    )
 
   (:incoming

Modified: 
gnuradio/branches/developers/eb/ibu/usrp/host/lib/inband/usrp_server.cc
===================================================================
--- gnuradio/branches/developers/eb/ibu/usrp/host/lib/inband/usrp_server.cc     
2007-06-03 18:48:52 UTC (rev 5638)
+++ gnuradio/branches/developers/eb/ibu/usrp/host/lib/inband/usrp_server.cc     
2007-06-03 19:20:21 UTC (rev 5639)
@@ -578,7 +578,7 @@
       std::cout << "[USRP_SERVER] Received raw frame invocation: " << 
invocation_handle << std::endl;
 
     // The actual response to the write will be generated by a 
s_response_usrp_write
-    d_cs_usrp->send(s_cmd_usrp_write, pmt_list4(invocation_handle, 
pmt_from_long(channel), v_packets, 
pmt_from_long(n_packets*transport_pkt::max_pkt_size())));
+    d_cs_usrp->send(s_cmd_usrp_write, pmt_list3(invocation_handle, 
pmt_from_long(channel), v_packets));
 
   }
 }

Modified: 
gnuradio/branches/developers/eb/ibu/usrp/host/lib/inband/usrp_usb_interface.cc
===================================================================
--- 
gnuradio/branches/developers/eb/ibu/usrp/host/lib/inband/usrp_usb_interface.cc  
    2007-06-03 18:48:52 UTC (rev 5638)
+++ 
gnuradio/branches/developers/eb/ibu/usrp/host/lib/inband/usrp_usb_interface.cc  
    2007-06-03 19:20:21 UTC (rev 5639)
@@ -44,7 +44,7 @@
 static pmt_t s_response_usrp_close = pmt_intern("response-usrp-close");
 static pmt_t s_response_usrp_write = pmt_intern("response-usrp-write");
 
-static const bool verbose = false;
+static const bool verbose = true;
 
 // need to take number of TX and RX channels as parameter
 usrp_usb_interface::usrp_usb_interface(mb_runtime *rt, const std::string 
&instance_name, pmt_t user_arg)
@@ -123,13 +123,16 @@
 
   // Open up a standard RX and TX for communication with the USRP
    
+  //std::string rbf = "usrp_inband_usb.rbf";
+  std::string rbf = "";
+
   d_utx = usrp_standard_tx::make(which_usrp,
                                 32,            // 128/32 -> 4MS/s
                                 1,             // 1 channel
                                 -1,            // mux
                                 4096,          // USB block size
                                 16,            // nblocks for async transfers
-                                "usrp_inband_usb.rbf"
+                                rbf
                                 );
   
   if(d_utx==0) {

Modified: 
gnuradio/branches/developers/eb/ibu/usrp/host/lib/inband/usrp_usb_interface_stub.cc
===================================================================
--- 
gnuradio/branches/developers/eb/ibu/usrp/host/lib/inband/usrp_usb_interface_stub.cc
 2007-06-03 18:48:52 UTC (rev 5638)
+++ 
gnuradio/branches/developers/eb/ibu/usrp/host/lib/inband/usrp_usb_interface_stub.cc
 2007-06-03 19:20:21 UTC (rev 5639)
@@ -140,7 +140,8 @@
   pmt_t invocation_handle = pmt_nth(0, data);
   long channel = pmt_to_long(pmt_nth(1, data));
   pmt_t v_packets = pmt_nth(2, data);
-  long n_bytes = pmt_to_long(pmt_nth(3, data));
+
+  size_t n_bytes;
   
   size_t psize;
   bool underrun;  // this will need to go, as it is taken care of in the 
packet headers
@@ -152,8 +153,8 @@
 
   if (d_disk_write) {
 
+    transport_pkt *pkts = (transport_pkt *) 
pmt_u8vector_writeable_elements(v_packets, n_bytes);
     long n_packets = static_cast<long>(std::ceil(n_bytes / 
(double)transport_pkt::max_payload()));
-    transport_pkt *pkts = (transport_pkt *) 
pmt_u8vector_writeable_elements(v_packets, psize);
 
     for(int i=0; i<(int)n_packets; i++) 
       ofile.write((const char*) pkts[i].payload(), pkts[i].payload_len());





reply via email to

[Prev in Thread] Current Thread [Next in Thread]