Kludge Tracker: Gnuradio - v3.4.0-101-g7e2b45b
Parent Directory
(gnuradio/usrp2)
Kludge Summary of gnuradio/usrp2/host
| Total Kludges |
28 |
| Total Subdirs |
4 |
All Directories within gnuradio/usrp2/host
All Files within gnuradio/usrp2/host
Kludge Snippets in gnuradio/usrp2/host
gnuradio/usrp2/host/apps/rx_streaming_samples.cc — 1
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
60 }
61
62 // ------------------------------------------------------------------------
63
64 // FIXME make this a template
65
66 class file_writer_16sc : public usrp2::rx_nop_handler
67 {
68 FILE *d_fp;
gnuradio/usrp2/host/apps/rx_streaming_samples.cc — 2
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
291 std::cerr << "Failed to enable realtime scheduling" << std::endl;
292
293 usrp2::usrp2::sptr u2 = usrp2::usrp2::make(interface, mac_addr_str);
294
295 // FIXME in case it was left running...
296 if (!u2->stop_rx_streaming()){
297 fprintf(stderr, "stop_rx_streaming failed\n");
298 }
299
gnuradio/usrp2/host/apps/stdin_int32_fft.py — 1
| PyFlakes |
undefined name 'ok' |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
164 input_rate = 100e6 / self.options.decim
165 self.scope.set_sample_rate(input_rate)
166 if self.show_debug_info: # update displayed values
167 self.myform['decim'].set_value(self.u.decim_rate())
168 return ok
169
170 def _setup_events(self):
171 if not self.options.waterfall and not self.options.oscilloscope:
172 self.scope.win.Bind(wx.EVT_LEFT_DCLICK, self.evt_left_dclick)
gnuradio/usrp2/host/apps/stdin_int32_fft.py — 2
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
108
109 def _build_subpanel(self, vbox_arg):
110 # build a secondary information panel (sometimes hidden)
111
112 # FIXME figure out how to have this be a subpanel that is always
113 # created, but has its visibility controlled by foo.Show(True/False)
114
115 def _form_set_decim(kv):
116 return self.set_decim(kv['decim'])
gnuradio/usrp2/host/apps/tx_samples.cc
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
256 if (fseek(fp, 0, SEEK_SET) == -1)
257 break;
258 }
259
260 // FIXME if r < 9, pad to 9 for minimum packet size constraint
261
262 if (!u2->tx_16sc(0, samples, r, &md)){
263 fprintf(stderr, "tx_complex_int16 failed\n");
264 break;
gnuradio/usrp2/host/include/usrp2/copiers.h
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
23 #include <stdint.h>
24
25 namespace usrp2 {
26
27 // FIXME we may want to rework this, but this will get us on the air
28
29 /*
30 * ----------------------------------------------------------------
31 * Copy and convert from USRP2 wire format to host format
gnuradio/usrp2/host/lib/copiers.cc — 1
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
29 #include <stdexcept>
30 #include <assert.h>
31 #include <string.h>
32
33 // FIXME need gruel::not_implemented
34
35 namespace usrp2 {
36
37 /*
gnuradio/usrp2/host/lib/copiers.cc — 2
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
35 namespace usrp2 {
36
37 /*
38 * N.B., in all of these, uint32_t *items is NOT 32-bit aligned!
39 * FIXME Needs fix for non-x86 machines.
40 */
41
42 /*
43 * ----------------------------------------------------------------
gnuradio/usrp2/host/lib/copiers.cc — 3
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
55 memcpy(host_items, items, nitems * sizeof(items[0]));
56
57 #else
58
59 // FIXME SIMD welcome here
60
61 for (size_t i = 0; i < nitems; i++){
62 uint32_t t = ntohx(items[i]);
63 //printf("%9d\n", items[i]);
gnuradio/usrp2/host/lib/copiers.cc — 4
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
100 memcpy(items, host_items, nitems * sizeof(items[0]));
101
102 #else
103
104 // FIXME SIMD welcome here
105
106 for (size_t i = 0; i < nitems; i++){
107 items[i] = htonl((host_items[i].real() << 16) | (host_items[i].imag() & 0xffff));
108 }
gnuradio/usrp2/host/lib/eth_common.h — 1
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
21
22 #ifndef INCLUDED_USRP2_ETH_COMMON_H
23 #define INCLUDED_USRP2_ETH_COMMON_H
24
25 #include <sys/uio.h> // FIXME autoconf this
26
27 namespace usrp2 {
28
29 enum eth_flags {
gnuradio/usrp2/host/lib/eth_common.h — 2
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
29 enum eth_flags {
30 EF_DONTWAIT = 0x0001,
31 };
32
33 typedef struct iovec eth_iovec; // FIXME autoconf this
34
35 } // namespace usrp2
36
37
gnuradio/usrp2/host/lib/find.cc
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
33
34 #define FIND_DEBUG 0
35
36
37 // FIXME move to gruel
38
39 static struct timeval
40 time_duration_to_timeval(boost::posix_time::time_duration delta)
41 {
gnuradio/usrp2/host/lib/strtod_si.c
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
41 case 'M': r *= 1e6; break;
42 case 'G': r *= 1e9; break;
43 case 'T': r *= 1e12; break;
44 default:
45 // ignore. FIXME could be more robust
46 break;
47 }
48
49 *result = r;
gnuradio/usrp2/host/lib/usrp2_impl.cc — 1
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
102 {
103 if (payload_len_in_bytes < sizeof(u2_fixed_hdr_t)) // invalid format
104 return false;
105
106 // FIXME deal with the fact that (p % 4) == 2
107 //assert((((uintptr_t) p) % 4) == 0); // must be 4-byte aligned
108
109 u2_fixed_hdr_t *fh = static_cast<u2_fixed_hdr_t *>(p);
110
gnuradio/usrp2/host/lib/usrp2_impl.cc — 2
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
107 //assert((((uintptr_t) p) % 4) == 0); // must be 4-byte aligned
108
109 u2_fixed_hdr_t *fh = static_cast<u2_fixed_hdr_t *>(p);
110
111 // FIXME unaligned loads!
112 md->word0 = u2p_word0(fh);
113 md->timestamp = u2p_timestamp(fh);
114
115 // FIXME when we've got more info
gnuradio/usrp2/host/lib/usrp2_impl.cc — 3
| Category |
FIXME |
| Committer |
eb |
| Commit ID |
bfe79d23738f24562dc7612049a90e8b20b53f79 |
111 // FIXME unaligned loads!
112 md->word0 = u2p_word0(fh);
113 md->timestamp = u2p_timestamp(fh);
114
115 // FIXME when we've got more info
116 // md->start_of_burst = (md->word0 & XXX) != 0;
117 // md->end_of_burst = (md->word0 & XXX) != 0;
118 // md->rx_overrun = (md->word0 & XXX) != 0;
119 md->start_of_burst = 0;
gnuradio/usrp2/host/lib/usrp2_impl.cc — 4
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
254 {
255 p->ehdr.ethertype = htons(U2_ETHERTYPE);
256 parse_mac_addr(dst, &p->ehdr.dst);
257 memcpy(&p->ehdr.src, d_eth_buf->mac(), 6);
258 p->thdr.flags = 0; // FIXME transport header values?
259 p->thdr.seqno = d_tx_seqno++;
260 p->thdr.ack = 0;
261 }
262
gnuradio/usrp2/host/lib/usrp2_impl.cc — 5
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
359 DEBUG_LOG(":");
360 // Receive available frames from ethernet buffer. Handler will
361 // process control frames, enqueue data packets in channel
362 // rings, and signal blocked API threads
363 int res = d_eth_buf->rx_frames(this, 100); // FIXME magic timeout
364 if (res == eth_buffer::EB_ERROR)
365 break;
366
367 // Wait for user API thread(s) to process all enqueued packets.
gnuradio/usrp2/host/lib/usrp2_impl.cc — 6
| Category |
Magic |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
359 DEBUG_LOG(":");
360 // Receive available frames from ethernet buffer. Handler will
361 // process control frames, enqueue data packets in channel
362 // rings, and signal blocked API threads
363 int res = d_eth_buf->rx_frames(this, 100); // FIXME magic timeout
364 if (res == eth_buffer::EB_ERROR)
365 break;
366
367 // Wait for user API thread(s) to process all enqueued packets.
gnuradio/usrp2/host/lib/usrp2_impl.cc — 7
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
383 usrp2::impl::operator()(const void *base, size_t len)
384 {
385 u2_eth_samples_t *pkt = (u2_eth_samples_t *)base;
386
387 // FIXME unaligned load!
388 int chan = u2p_chan(&pkt->hdrs.fixed);
389
390 if (chan == CONTROL_CHAN) { // control packets
391 DEBUG_LOG("c");
gnuradio/usrp2/host/lib/usrp2_impl.cc — 8
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
407 {
408 // point to beginning of payload (subpackets)
409 unsigned char *p = (unsigned char *)base + sizeof(u2_eth_packet_t);
410
411 // FIXME (p % 4) == 2. Not good. Must watch for unaligned loads.
412
413 // FIXME iterate over payload, handling more than a single subpacket.
414
415 int opcode = p[0];
gnuradio/usrp2/host/lib/usrp2_impl.cc — 9
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
409 unsigned char *p = (unsigned char *)base + sizeof(u2_eth_packet_t);
410
411 // FIXME (p % 4) == 2. Not good. Must watch for unaligned loads.
412
413 // FIXME iterate over payload, handling more than a single subpacket.
414
415 int opcode = p[0];
416 unsigned int oplen = p[1];
417 unsigned int rid = p[2];
gnuradio/usrp2/host/lib/usrp2_impl.cc — 10
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
443 u2_eth_samples_t *pkt = (u2_eth_samples_t *)base;
444 d_num_rx_frames++;
445 d_num_rx_bytes += len;
446
447 /* --- FIXME start of fake transport layer handler --- */
448
449 if (d_rx_seqno != -1) {
450 int expected_seqno = (d_rx_seqno + 1) & 0xFF;
451 int seqno = pkt->hdrs.thdr.seqno;
gnuradio/usrp2/host/lib/usrp2_impl.cc — 11
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
464 d_rx_seqno = pkt->hdrs.thdr.seqno;
465
466 /* --- end of fake transport layer handler --- */
467
468 // FIXME unaligned load!
469 unsigned int chan = u2p_chan(&pkt->hdrs.fixed);
470
471 {
472 gruel::scoped_lock l(d_channel_rings_mutex);
gnuradio/usrp2/host/lib/usrp2_impl.cc — 12
| Category |
FIXME |
| Committer |
eb |
| Commit ID |
cfdc2e80d867777a405b3f1ba8ae6278b4f29f97 |
1145 {
1146 if (nitems == 0)
1147 return true;
1148
1149 // FIXME can't deal with nitems < U2_MIN_SAMPLES (will be fixed in VRT)
1150 // FIXME need to check the MTU instead of assuming 1500 bytes
1151
1152 // fragment as necessary then fire away
1153
gnuradio/usrp2/host/lib/usrp2_impl.cc — 13
| Category |
FIXME |
| Committer |
eb |
| Commit ID |
cfdc2e80d867777a405b3f1ba8ae6278b4f29f97 |
1146 if (nitems == 0)
1147 return true;
1148
1149 // FIXME can't deal with nitems < U2_MIN_SAMPLES (will be fixed in VRT)
1150 // FIXME need to check the MTU instead of assuming 1500 bytes
1151
1152 // fragment as necessary then fire away
1153
1154 size_t nframes = (nitems + U2_MAX_SAMPLES - 1) / U2_MAX_SAMPLES;
gnuradio/usrp2/host/lib/usrp2_socket_opener.cc
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
111 int unix_domain_fd = strtol(argv[1], &endptr, 0);
112 if (*endptr != 0)
113 usage();
114
115 // FIXME get client credentials from unix_domain_fd using SCM_CREDENTIALS
116
117 // open the raw socket
118 int socket_fd = socket(PF_PACKET, SOCK_RAW, htons(0xBEEF));
119 if (socket_fd == -1){