[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r8428 - gnuradio/branches/developers/gnychis/inband/us
From: |
gnychis |
Subject: |
[Commit-gnuradio] r8428 - gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband |
Date: |
Thu, 15 May 2008 08:17:18 -0600 (MDT) |
Author: gnychis
Date: 2008-05-15 08:17:16 -0600 (Thu, 15 May 2008)
New Revision: 8428
Modified:
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_inband_usb_packet.h
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_server.cc
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_server.h
Log:
work in progress on tag and dropped flag for TX success feedback from USRP
Modified:
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_inband_usb_packet.h
===================================================================
---
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_inband_usb_packet.h
2008-05-15 01:58:44 UTC (rev 8427)
+++
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_inband_usb_packet.h
2008-05-15 14:17:16 UTC (rev 8428)
@@ -73,8 +73,9 @@
static const int FL_OVERRUN_SHIFT = 31;
static const int FL_UNDERRUN_SHIFT = 30;
static const int FL_DROPPED_SHIFT = 29;
+ static const int FL_START_OF_BURST_SHIFT = 28;
static const int FL_END_OF_BURST_SHIFT = 27;
- static const int FL_START_OF_BURST_SHIFT = 28;
+ static const int FL_CARRIER_SENSE_SHIFT = 26;
static const int RSSI_MASK = 0x3f;
static const int RSSI_SHIFT = 21;
Modified:
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_server.cc
===================================================================
---
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_server.cc
2008-05-15 01:58:44 UTC (rev 8427)
+++
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_server.cc
2008-05-15 14:17:16 UTC (rev 8428)
@@ -136,6 +136,10 @@
for(int i=0; i < D_MAX_RID; i++)
d_rids.push_back(rid_info());
+ for(int i=0; i < D_MAX_TAG; i++)
+ d_tags.push_back(tag_info());
+ d_curr_tag=0;
+
//d_fake_rx=true;
}
@@ -729,15 +733,19 @@
std::min((long)(n_bytes-(n*max_payload_len)), (long)max_payload_len);
if(n == 0) { // first packet gets start of burst flag and timestamp
+
+ d_tags[d_curr_tag].owner = port->port_symbol();
+ d_tags[d_curr_tag].invocation_handle = invocation_handle;
if(carrier_sense)
pkts[n].set_header(pkts[n].FL_START_OF_BURST
| pkts[n].FL_CARRIER_SENSE,
- channel, 0, payload_len);
+ channel, d_curr_tag, payload_len);
else
- pkts[n].set_header(pkts[n].FL_START_OF_BURST, channel, 0, payload_len);
+ pkts[n].set_header(pkts[n].FL_START_OF_BURST, channel, d_curr_tag,
payload_len);
pkts[n].set_timestamp(timestamp);
+ d_curr_tag = (d_curr_tag+1) % D_MAX_TAG;
} else {
pkts[n].set_header(0, channel, 0, payload_len);
@@ -758,7 +766,7 @@
<< invocation_handle << std::endl;
// The actual response to the write will be generated by a
- // s_response_usrp_write since we cannot determine whether to transmit was
+ // s_response_usrp_write since we cannot determine whether the transmit was
// successful until we hear from the lower layers.
d_cs_usrp->send(s_cmd_usrp_write,
pmt_list3(invocation_handle,
Modified:
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_server.h
===================================================================
---
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_server.h
2008-05-15 01:58:44 UTC (rev 8427)
+++
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_server.h
2008-05-15 14:17:16 UTC (rev 8428)
@@ -69,8 +69,23 @@
}
};
+ struct tag_info {
+ pmt_t owner;
+ pmt_t invocation_handle;
+
+ tag_info() {
+ owner = PMT_NIL;
+ invocation_handle = PMT_NIL;
+ }
+ };
+
static const long D_MAX_RID = 64;
std::vector<rid_info> d_rids;
+
+ static const long D_MAX_TAG = 16;
+ std::vector<tag_info> d_tags;
+ unsigned long d_curr_tag;
+
struct channel_info {
long assigned_capacity; // the capacity currently assignedby the channel
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r8428 - gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband,
gnychis <=