[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r5652 - in gnuradio/branches/features/ofdm/receiver/gn
From: |
trondeau |
Subject: |
[Commit-gnuradio] r5652 - in gnuradio/branches/features/ofdm/receiver/gnuradio-core/src/python/gnuradio: . blksimpl |
Date: |
Sun, 3 Jun 2007 19:40:30 -0600 (MDT) |
Author: trondeau
Date: 2007-06-03 19:40:30 -0600 (Sun, 03 Jun 2007)
New Revision: 5652
Modified:
gnuradio/branches/features/ofdm/receiver/gnuradio-core/src/python/gnuradio/blksimpl/ofdm_pkt.py
gnuradio/branches/features/ofdm/receiver/gnuradio-core/src/python/gnuradio/ofdm_packet_utils.py
Log:
cleaning up code, removing references to mtu, adding ability to turn whitening
on and off in packetizer
Modified:
gnuradio/branches/features/ofdm/receiver/gnuradio-core/src/python/gnuradio/blksimpl/ofdm_pkt.py
===================================================================
---
gnuradio/branches/features/ofdm/receiver/gnuradio-core/src/python/gnuradio/blksimpl/ofdm_pkt.py
2007-06-04 01:39:55 UTC (rev 5651)
+++
gnuradio/branches/features/ofdm/receiver/gnuradio-core/src/python/gnuradio/blksimpl/ofdm_pkt.py
2007-06-04 01:40:30 UTC (rev 5652)
@@ -65,7 +65,7 @@
symbol_length = options.fft_length + options.cp_length
# accepts messages from the outside world
- self._pkt_input = gr.ofdm_bpsk_mapper(options.mtu,
options.occupied_tones, options.fft_length, ks1, ks2)
+ self._pkt_input = gr.ofdm_bpsk_mapper(msgq_limit,
options.occupied_tones, options.fft_length, ks1, ks2)
self.ifft = gr.fft_vcc(options.fft_length, False, win, True)
self.cp_adder = gr.ofdm_cyclic_prefixer(options.fft_length,
symbol_length)
self.scale = gr.multiply_const_cc(1.0 / math.sqrt(options.fft_length))
@@ -102,9 +102,6 @@
def samples_per_symbol(self):
return 2
- def mtu(self):
- return self._mtu
-
def bits_per_symbol(self=None): # staticmethod that's also callable on
an instance
return 1
bits_per_symbol = staticmethod(bits_per_symbol) # make it a static
method. RTFM
@@ -113,8 +110,6 @@
"""
Adds OFDM-specific options to the Options Parser
"""
- expert.add_option("", "--mtu", type="int", default=1500,
- help="set maximum transmit unit [default=%default]")
expert.add_option("", "--fft-length", type="intx", default=512,
help="set the number of FFT bins [default=%default]")
expert.add_option("", "--occupied-tones", type="intx", default=200,
Modified:
gnuradio/branches/features/ofdm/receiver/gnuradio-core/src/python/gnuradio/ofdm_packet_utils.py
===================================================================
---
gnuradio/branches/features/ofdm/receiver/gnuradio-core/src/python/gnuradio/ofdm_packet_utils.py
2007-06-04 01:39:55 UTC (rev 5651)
+++
gnuradio/branches/features/ofdm/receiver/gnuradio-core/src/python/gnuradio/ofdm_packet_utils.py
2007-06-04 01:40:30 UTC (rev 5652)
@@ -96,7 +96,7 @@
return struct.pack('!HH', val, val)
def make_packet(payload, samples_per_symbol, bits_per_symbol,
- pad_for_usrp=True, whitener_offset=0):
+ pad_for_usrp=True, whitener_offset=0, dowhiten=1):
"""
Build a packet, given access code, payload, and whitener offset
@@ -128,9 +128,12 @@
if pad_for_usrp:
usrp_packing = _npadding_bytes(packet_length, samples_per_symbol,
bits_per_symbol) * '\x55'
pkt_dt = pkt_dt + usrp_packing
- pkt = pkt_hd + whiten(pkt_dt, whitener_offset)
- #pkt = pkt_hd + pkt_dt
+ if(dowhiten):
+ pkt = pkt_hd + whiten(pkt_dt, whitener_offset)
+ else:
+ pkt = pkt_hd + pkt_dt
+
#print "make_packet: len(pkt) =", len(pkt)
return pkt
@@ -157,14 +160,17 @@
return byte_modulus - r
-def unmake_packet(whitened_payload_with_crc, whitener_offset=0):
+def unmake_packet(whitened_payload_with_crc, whitener_offset=0, dodewhiten=1):
"""
Return (ok, payload)
@param whitened_payload_with_crc: string
"""
- payload_with_crc = dewhiten(whitened_payload_with_crc, whitener_offset)
- #payload_with_crc = whitened_payload_with_crc
+ if dodewhiten:
+ payload_with_crc = dewhiten(whitened_payload_with_crc, whitener_offset)
+ else:
+ payload_with_crc = whitened_payload_with_crc
+
ok, payload = gru.check_crc32(payload_with_crc)
if 0:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r5652 - in gnuradio/branches/features/ofdm/receiver/gnuradio-core/src/python/gnuradio: . blksimpl,
trondeau <=