[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 43/57: digital: added option to packet_util
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 43/57: digital: added option to packet_utils.unmake_packet to check or not check the CRC. |
Date: |
Wed, 21 May 2014 03:10:30 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch master
in repository gnuradio.
commit f23b3106cd2c73be3708c29dc85afb37298d4731
Author: Tom Rondeau <address@hidden>
Date: Fri May 16 12:16:07 2014 -0400
digital: added option to packet_utils.unmake_packet to check or not check
the CRC.
---
gr-digital/python/digital/packet_utils.py | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/gr-digital/python/digital/packet_utils.py
b/gr-digital/python/digital/packet_utils.py
index efb3252..a73480b 100644
--- a/gr-digital/python/digital/packet_utils.py
+++ b/gr-digital/python/digital/packet_utils.py
@@ -182,12 +182,16 @@ def _npadding_bytes(pkt_byte_len, samples_per_symbol,
bits_per_symbol):
return byte_modulus - r
-def unmake_packet(whitened_payload_with_crc, whitener_offset=0,
dewhitening=True):
+def unmake_packet(whitened_payload_with_crc, whitener_offset=0,
+ dewhitening=True, check_crc=True):
"""
Return (ok, payload)
Args:
whitened_payload_with_crc: string
+ whitener_offset: integer offset into whitener table
+ dewhitening: True if we should run this through the dewhitener
+ check_crc: True if we should check the CRC of the packet
"""
if dewhitening:
@@ -195,7 +199,11 @@ def unmake_packet(whitened_payload_with_crc,
whitener_offset=0, dewhitening=True
else:
payload_with_crc = (whitened_payload_with_crc)
- ok, payload = crc.check_crc32(payload_with_crc)
+ if check_crc:
+ ok, payload = crc.check_crc32(payload_with_crc)
+ else:
+ payload = payload_with_crc
+ ok = True
if 0:
print "payload_with_crc =", string_to_hex_list(payload_with_crc)
- [Commit-gnuradio] [gnuradio] 17/57: adding ber sink to qt gui, (continued)
- [Commit-gnuradio] [gnuradio] 17/57: adding ber sink to qt gui, git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 24/57: digital: use FFT filters for the correlate_and_sync block., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 27/57: grc: adding advanced tab feature to set a block's alias., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 29/57: grc: fixes bug with controlport monitors where true/false enable parameter is not respected., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 02/57: runtime: white space removal., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 31/57: fec: use logger to explain exception when using threading with history., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 26/57: fec: changed puncture block for easier to use API., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 18/57: volk: added conv kernel puppet and added to QA and profile., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 34/57: qtgui: work on ber sink for fecapi, git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 35/57: runtime: don't add the log appender --> adds to C++, too., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 43/57: digital: added option to packet_utils.unmake_packet to check or not check the CRC.,
git <=
- [Commit-gnuradio] [gnuradio] 44/57: blocks: adds kernels for pack_k_bits and unpack_k_bits., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 30/57: runtime: configuring loggers in gr Python module for easy use in Python., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 39/57: digital: modified tagged stream correlate access code., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 37/57: Revert "blocks: add optional argument to deinterleave and interleave ctors to not set relative rate.", git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 42/57: fec: wip: fixing formatting., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 32/57: blocks: add optional argument to deinterleave and interleave ctors to not set relative rate., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 48/57: fec: wip: adding extended encoder for async version., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 47/57: digital: don't need the FEC info for the tagged stream corr access code., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 46/57: blocks: adding an option to swap the order of the output bits of a repack_bits block., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 45/57: fec: wip: using unpack/pack k bits kernels instead of copying logic in here., git, 2014/05/20