diff --git a/examples/wifi_rx.grc b/examples/wifi_rx.grc
index 6992130..7c7210d 100644
--- a/examples/wifi_rx.grc
+++ b/examples/wifi_rx.grc
@@ -52,10 +52,18 @@
realtime_scheduling
+
+ thread_safe_setters
+
+
alias
+
+ comment
+
+
_coordinate
(8, 11)
@@ -83,6 +91,10 @@
alias
+
+ comment
+
+
_coordinate
(672, 75)
@@ -110,6 +122,10 @@
alias
+
+ comment
+
+
_coordinate
(672, 11)
@@ -157,6 +173,10 @@
maxoutbuf
0
+
+ comment
+
+
_coordinate
(576, 846)
@@ -240,6 +260,10 @@
affinity
+
+ comment
+
+
_coordinate
(349, 806)
@@ -283,6 +307,10 @@
maxoutbuf
0
+
+ comment
+
+
_coordinate
(680, 707)
@@ -342,6 +370,10 @@
maxoutbuf
0
+
+ comment
+
+
_coordinate
(152, 683)
@@ -393,6 +425,10 @@
maxoutbuf
0
+
+ comment
+
+
_coordinate
(480, 563)
@@ -440,6 +476,10 @@
maxoutbuf
0
+
+ comment
+
+
_coordinate
(912, 547)
@@ -491,6 +531,10 @@
maxoutbuf
0
+
+ comment
+
+
_coordinate
(256, 339)
@@ -526,6 +570,10 @@
maxoutbuf
0
+
+ comment
+
+
_coordinate
(424, 344)
@@ -573,6 +621,10 @@
maxoutbuf
0
+
+ comment
+
+
_coordinate
(664, 312)
@@ -616,6 +668,10 @@
maxoutbuf
0
+
+ comment
+
+
_coordinate
(816, 323)
@@ -655,6 +711,10 @@
maxoutbuf
0
+
+ comment
+
+
_coordinate
(1032, 328)
@@ -702,6 +762,10 @@
maxoutbuf
0
+
+ comment
+
+
_coordinate
(1192, 400)
@@ -785,6 +849,10 @@
affinity
+
+ comment
+
+
_coordinate
(1171, 560)
@@ -828,6 +896,10 @@
maxoutbuf
0
+
+ comment
+
+
_coordinate
(808, 227)
@@ -867,6 +939,10 @@
maxoutbuf
0
+
+ comment
+
+
_coordinate
(464, 232)
@@ -876,6 +952,670 @@
0
+
+ ieee802_11_ofdm_equalize_symbols
+
+ id
+ ieee802_11_ofdm_equalize_symbols_0
+
+
+ _enabled
+ True
+
+
+ algo
+ chan_est
+
+
+ debug
+ False
+
+
+ alias
+
+
+
+ affinity
+
+
+
+ minoutbuf
+ 0
+
+
+ maxoutbuf
+ 0
+
+
+ comment
+
+
+
+ _coordinate
+ (416, 707)
+
+
+ _rotation
+ 0
+
+
+
+ ieee802_11_ofdm_decode_mac
+
+ id
+ ieee802_11_ofdm_decode_mac_0
+
+
+ _enabled
+ True
+
+
+ log
+ True
+
+
+ debug
+ False
+
+
+ alias
+
+
+
+ affinity
+
+
+
+ minoutbuf
+ 0
+
+
+ maxoutbuf
+ 0
+
+
+ comment
+
+
+
+ _coordinate
+ (1000, 707)
+
+
+ _rotation
+ 0
+
+
+
+ variable_chooser
+
+ id
+ lo_offset
+
+
+ _enabled
+ True
+
+
+ label
+ LO Offset
+
+
+ value
+ 0
+
+
+ choices
+ [0, 6e6, 11e6]
+
+
+ labels
+ ['0 MHz', '6 MHz', '11 MHz']
+
+
+ type
+ drop_down
+
+
+ style
+ wx.RA_HORIZONTAL
+
+
+ grid_pos
+
+
+
+ notebook
+
+
+
+ alias
+
+
+
+ comment
+
+
+
+ _coordinate
+ (176, 11)
+
+
+ _rotation
+ 0
+
+
+
+ variable_chooser
+
+ id
+ chan_est
+
+
+ _enabled
+ True
+
+
+ label
+
+
+
+ value
+ 1
+
+
+ choices
+ [0, 1]
+
+
+ labels
+ ["LMS", "Linear Comb"]
+
+
+ type
+ radio_buttons
+
+
+ style
+ wx.RA_HORIZONTAL
+
+
+ grid_pos
+
+
+
+ notebook
+
+
+
+ alias
+
+
+
+ comment
+
+
+
+ _coordinate
+ (352, 11)
+
+
+ _rotation
+ 0
+
+
+
+ notebook
+
+ id
+ nb
+
+
+ _enabled
+ True
+
+
+ style
+ wx.NB_TOP
+
+
+ labels
+ ['constellation', 'autocorrelation']
+
+
+ grid_pos
+
+
+
+ notebook
+
+
+
+ alias
+
+
+
+ comment
+
+
+
+ _coordinate
+ (504, 11)
+
+
+ _rotation
+ 0
+
+
+
+ variable_slider
+
+ id
+ gain
+
+
+ _enabled
+ True
+
+
+ label
+
+
+
+ value
+ 20
+
+
+ min
+ 0
+
+
+ max
+ 100
+
+
+ num_steps
+ 100
+
+
+ style
+ wx.SL_HORIZONTAL
+
+
+ converver
+ int_converter
+
+
+ grid_pos
+
+
+
+ notebook
+
+
+
+ alias
+
+
+
+ comment
+
+
+
+ _coordinate
+ (776, 11)
+
+
+ _rotation
+ 0
+
+
+
+ ieee802_11_ofdm_sync_short
+
+ id
+ ieee802_11_ofdm_sync_short_0
+
+
+ _enabled
+ True
+
+
+ log
+ False
+
+
+ debug
+ False
+
+
+ threshold
+ 0.85 * 0.75
+
+
+ min_plateau
+ 2
+
+
+ alias
+
+
+
+ affinity
+
+
+
+ minoutbuf
+ 0
+
+
+ maxoutbuf
+ 0
+
+
+ comment
+
+
+
+ _coordinate
+ (216, 504)
+
+
+ _rotation
+ 0
+
+
+
+ ieee802_11_ofdm_parse_mac
+
+ id
+ ieee802_11_ofdm_parse_mac_0
+
+
+ _enabled
+ True
+
+
+ log
+ False
+
+
+ debug
+ True
+
+
+ alias
+
+
+
+ affinity
+
+
+
+ minoutbuf
+ 0
+
+
+ maxoutbuf
+ 0
+
+
+ comment
+
+
+
+ _coordinate
+ (960, 1099)
+
+
+ _rotation
+ 180
+
+
+
+ blocks_pdu_to_tagged_stream
+
+ id
+ blocks_pdu_to_tagged_stream_0
+
+
+ _enabled
+ True
+
+
+ type
+ float
+
+
+ tag
+ packet_len
+
+
+ alias
+
+
+
+ affinity
+
+
+
+ minoutbuf
+ 0
+
+
+ maxoutbuf
+ 0
+
+
+ comment
+
+
+
+ _coordinate
+ (720, 1107)
+
+
+ _rotation
+ 180
+
+
+
+ wxgui_numbersink2
+
+ id
+ wxgui_numbersink2_0
+
+
+ _enabled
+ True
+
+
+ type
+ float
+
+
+ title
+ Frame Error Rate
+
+
+ units
+ %
+
+
+ samp_rate
+ 1
+
+
+ min_value
+ 0
+
+
+ max_value
+ 100
+
+
+ factor
+ 1.0
+
+
+ decimal_places
+ 2
+
+
+ ref_level
+ 0
+
+
+ number_rate
+ 15
+
+
+ peak_hold
+ False
+
+
+ average
+ True
+
+
+ avg_alpha
+ 0.02
+
+
+ show_gauge
+ True
+
+
+ win_size
+
+
+
+ grid_pos
+
+
+
+ notebook
+
+
+
+ alias
+
+
+
+ affinity
+
+
+
+ comment
+
+
+
+ _coordinate
+ (512, 1027)
+
+
+ _rotation
+ 180
+
+
+
+ foo_wireshark_connector
+
+ id
+ foo_wireshark_connector_0
+
+
+ _enabled
+ False
+
+
+ tech
+ 127
+
+
+ debug
+ False
+
+
+ alias
+
+
+
+ affinity
+
+
+
+ minoutbuf
+ 0
+
+
+ maxoutbuf
+ 0
+
+
+ comment
+
+
+
+ _coordinate
+ (952, 947)
+
+
+ _rotation
+ 180
+
+
+
+ blocks_file_sink
+
+ id
+ blocks_file_sink_0
+
+
+ _enabled
+ False
+
+
+ file
+ /tmp/ofdm.pcap
+
+
+ type
+ byte
+
+
+ vlen
+ 1
+
+
+ unbuffered
+ True
+
+
+ append
+ True
+
+
+ alias
+
+
+
+ affinity
+
+
+
+ comment
+
+
+
+ _coordinate
+ (720, 939)
+
+
+ _rotation
+ 180
+
+
uhd_usrp_source
@@ -1682,6 +2422,10 @@
maxoutbuf
0
+
+ comment
+
+
_coordinate
(16, 211)
@@ -1692,53 +2436,10 @@
- ieee802_11_ofdm_equalize_symbols
+ ieee802_11_ofdm_sync_long
id
- ieee802_11_ofdm_equalize_symbols_0
-
-
- _enabled
- True
-
-
- algo
- chan_est
-
-
- debug
- False
-
-
- alias
-
-
-
- affinity
-
-
-
- minoutbuf
- 0
-
-
- maxoutbuf
- 0
-
-
- _coordinate
- (416, 707)
-
-
- _rotation
- 0
-
-
-
- ieee802_11_ofdm_decode_mac
-
- id
- ieee802_11_ofdm_decode_mac_0
+ ieee802_11_ofdm_sync_long_0
_enabled
@@ -1752,6 +2453,10 @@
debug
False
+
+ sync_length
+ sync_length
+
alias
@@ -1769,216 +2474,12 @@
0
- _coordinate
- (1000, 707)
-
-
- _rotation
- 0
-
-
-
- variable_chooser
-
- id
- lo_offset
-
-
- _enabled
- True
-
-
- label
- LO Offset
-
-
- value
- 0
-
-
- choices
- [0, 6e6, 11e6]
-
-
- labels
- ['0 MHz', '6 MHz', '11 MHz']
-
-
- type
- drop_down
-
-
- style
- wx.RA_HORIZONTAL
-
-
- grid_pos
-
-
-
- notebook
-
-
-
- alias
+ comment
_coordinate
- (176, 11)
-
-
- _rotation
- 0
-
-
-
- variable_chooser
-
- id
- chan_est
-
-
- _enabled
- True
-
-
- label
-
-
-
- value
- 1
-
-
- choices
- [0, 1]
-
-
- labels
- ["LMS", "Linear Comb"]
-
-
- type
- radio_buttons
-
-
- style
- wx.RA_HORIZONTAL
-
-
- grid_pos
-
-
-
- notebook
-
-
-
- alias
-
-
-
- _coordinate
- (352, 11)
-
-
- _rotation
- 0
-
-
-
- notebook
-
- id
- nb
-
-
- _enabled
- True
-
-
- style
- wx.NB_TOP
-
-
- labels
- ['constellation', 'autocorrelation']
-
-
- grid_pos
-
-
-
- notebook
-
-
-
- alias
-
-
-
- _coordinate
- (504, 11)
-
-
- _rotation
- 0
-
-
-
- variable_slider
-
- id
- gain
-
-
- _enabled
- True
-
-
- label
-
-
-
- value
- 20
-
-
- min
- 0
-
-
- max
- 100
-
-
- num_steps
- 100
-
-
- style
- wx.SL_HORIZONTAL
-
-
- converver
- int_converter
-
-
- grid_pos
-
-
-
- notebook
-
-
-
- alias
-
-
-
- _coordinate
- (776, 11)
+ (672, 531)
_rotation
@@ -2031,6 +2532,10 @@
alias
+
+ comment
+
+
_coordinate
(896, 11)
@@ -2060,11 +2565,11 @@
choices
- [10e6, 20e6]
+ [5e6, 10e6, 20e6]
labels
- ["10 Mhz", "20 Mhz"]
+ ["5 MHz", "10 MHz", "20 MHz"]
type
@@ -2086,6 +2591,10 @@
alias
+
+ comment
+
+
_coordinate
(1072, 11)
@@ -2095,375 +2604,6 @@
0
-
- ieee802_11_ofdm_sync_short
-
- id
- ieee802_11_ofdm_sync_short_0
-
-
- _enabled
- True
-
-
- log
- False
-
-
- debug
- False
-
-
- threshold
- 0.85 * 0.75
-
-
- min_plateau
- 2
-
-
- alias
-
-
-
- affinity
-
-
-
- minoutbuf
- 0
-
-
- maxoutbuf
- 0
-
-
- _coordinate
- (216, 504)
-
-
- _rotation
- 0
-
-
-
- ieee802_11_ofdm_sync_long
-
- id
- ieee802_11_ofdm_sync_long_0
-
-
- _enabled
- True
-
-
- log
- False
-
-
- debug
- False
-
-
- sync_length
- sync_length
-
-
- alias
-
-
-
- affinity
-
-
-
- minoutbuf
- 0
-
-
- maxoutbuf
- 0
-
-
- _coordinate
- (672, 531)
-
-
- _rotation
- 0
-
-
-
- ieee802_11_ofdm_parse_mac
-
- id
- ieee802_11_ofdm_parse_mac_0
-
-
- _enabled
- True
-
-
- log
- False
-
-
- debug
- True
-
-
- alias
-
-
-
- affinity
-
-
-
- minoutbuf
- 0
-
-
- maxoutbuf
- 0
-
-
- _coordinate
- (960, 1099)
-
-
- _rotation
- 180
-
-
-
- blocks_pdu_to_tagged_stream
-
- id
- blocks_pdu_to_tagged_stream_0
-
-
- _enabled
- True
-
-
- type
- float
-
-
- tag
- packet_len
-
-
- alias
-
-
-
- affinity
-
-
-
- minoutbuf
- 0
-
-
- maxoutbuf
- 0
-
-
- _coordinate
- (720, 1107)
-
-
- _rotation
- 180
-
-
-
- wxgui_numbersink2
-
- id
- wxgui_numbersink2_0
-
-
- _enabled
- True
-
-
- type
- float
-
-
- title
- Frame Error Rate
-
-
- units
- %
-
-
- samp_rate
- 1
-
-
- min_value
- 0
-
-
- max_value
- 100
-
-
- factor
- 1.0
-
-
- decimal_places
- 2
-
-
- ref_level
- 0
-
-
- number_rate
- 15
-
-
- peak_hold
- False
-
-
- average
- True
-
-
- avg_alpha
- 0.02
-
-
- show_gauge
- True
-
-
- win_size
-
-
-
- grid_pos
-
-
-
- notebook
-
-
-
- alias
-
-
-
- affinity
-
-
-
- _coordinate
- (512, 1027)
-
-
- _rotation
- 180
-
-
-
- foo_wireshark_connector
-
- id
- foo_wireshark_connector_0
-
-
- _enabled
- False
-
-
- tech
- 127
-
-
- debug
- False
-
-
- alias
-
-
-
- affinity
-
-
-
- minoutbuf
- 0
-
-
- maxoutbuf
- 0
-
-
- _coordinate
- (952, 947)
-
-
- _rotation
- 180
-
-
-
- blocks_file_sink
-
- id
- blocks_file_sink_0
-
-
- _enabled
- False
-
-
- file
- /tmp/ofdm.pcap
-
-
- type
- byte
-
-
- vlen
- 1
-
-
- unbuffered
- True
-
-
- append
- True
-
-
- alias
-
-
-
- affinity
-
-
-
- _coordinate
- (720, 939)
-
-
- _rotation
- 180
-
-
blocks_stream_to_vector_0
fft_vxx_0
diff --git a/lib/ofdm_sync_long.cc b/lib/ofdm_sync_long.cc
index 947ff6d..f19a347 100644
--- a/lib/ofdm_sync_long.cc
+++ b/lib/ofdm_sync_long.cc
@@ -66,7 +66,7 @@ int general_work (int noutput, gr_vector_int& ninput_items,
int ninput = std::min(std::min(ninput_items[0], ninput_items[1]), 8192);
- const unsigned int nread = nitems_read(0);
+ const uint64_t nread = nitems_read(0);
get_tags_in_range(d_tags, 0, nread, nread + ninput);
if (d_tags.size()) {
std::sort(d_tags.begin(), d_tags.end(), gr::tag_t::offset_compare);
@@ -104,6 +104,7 @@ int general_work (int noutput, gr_vector_int& ninput_items,
if(d_offset == SYNC_LENGTH) {
search_frame_start();
d_offset = 0;
+ d_count = 0;
d_state = COPY;
break;
@@ -131,18 +132,13 @@ int general_work (int noutput, gr_vector_int& ninput_items,
i++;
d_offset++;
- if(d_offset == 1) {
- dout << "produced " << d_count << " " << d_count / 64.0 << std::endl;
- d_count = 0;
- }
}
break;
case RESET: {
- int h = 0;
while(o < noutput) {
- if(((d_count + h) % 64) == 0) {
+ if(((d_count + o) % 64) == 0) {
d_offset = 0;
d_state = SYNC;
break;
@@ -150,7 +146,6 @@ int general_work (int noutput, gr_vector_int& ninput_items,
out[o] = 0;
o++;
}
- h++;
}
break;