[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 11/24: digital: fixed packet parser QA test
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 11/24: digital: fixed packet parser QA tests |
Date: |
Tue, 14 Jun 2016 00:40:58 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch packet2
in repository gnuradio.
commit 5959a2e4a61a1c99eb3d94a1d0ed03250318b095
Author: Tom Rondeau <address@hidden>
Date: Fri Apr 8 16:32:39 2016 -0400
digital: fixed packet parser QA tests
---
gr-digital/lib/qa_packet_formatters.cc | 8 --------
gr-digital/python/digital/qa_packet_format.py | 6 +++---
2 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/gr-digital/lib/qa_packet_formatters.cc
b/gr-digital/lib/qa_packet_formatters.cc
index e6cfb16..aa3d033 100644
--- a/gr-digital/lib/qa_packet_formatters.cc
+++ b/gr-digital/lib/qa_packet_formatters.cc
@@ -127,14 +127,10 @@ qa_packet_formatters::test_default_parse()
pmt::pmt_t dict = info[0];
int payload_bits = pmt::to_long(pmt::dict_ref(dict, pmt::intern("payload
bits"),
pmt::PMT_NIL));
- int skip_samps = pmt::to_long(pmt::dict_ref(dict, pmt::intern("skip samps"),
- pmt::PMT_NIL));
int hdr_bits = (int)formatter->header_nbits();
int expected_bits = nbits - hdr_bits;
- int expected_skip = index * 8 + hdr_bits;
CPPUNIT_ASSERT_EQUAL(expected_bits, payload_bits);
- CPPUNIT_ASSERT_EQUAL(expected_skip, skip_samps);
volk_free(bytes);
volk_free(bits);
@@ -253,8 +249,6 @@ qa_packet_formatters::test_counter_parse()
pmt::pmt_t dict = info[0];
int payload_bits = pmt::to_long(pmt::dict_ref(dict, pmt::intern("payload
bits"),
pmt::PMT_NIL));
- int skip_samps = pmt::to_long(pmt::dict_ref(dict, pmt::intern("skip samps"),
- pmt::PMT_NIL));
int bps = pmt::to_long(pmt::dict_ref(dict, pmt::intern("bps"),
pmt::PMT_NIL));
int counter = pmt::to_long(pmt::dict_ref(dict, pmt::intern("counter"),
@@ -262,9 +256,7 @@ qa_packet_formatters::test_counter_parse()
int hdr_bits = (int)formatter->header_nbits();
int expected_bits = nbits - hdr_bits;
- int expected_skip = index * 8 + hdr_bits;
CPPUNIT_ASSERT_EQUAL(expected_bits, payload_bits);
- CPPUNIT_ASSERT_EQUAL(expected_skip, skip_samps);
CPPUNIT_ASSERT_EQUAL(expected_bps, (uint16_t)bps);
CPPUNIT_ASSERT_EQUAL(0, counter);
diff --git a/gr-digital/python/digital/qa_packet_format.py
b/gr-digital/python/digital/qa_packet_format.py
index 40bc144..2dbe600 100644
--- a/gr-digital/python/digital/qa_packet_format.py
+++ b/gr-digital/python/digital/qa_packet_format.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2014 Free Software Foundation, Inc.
+# Copyright 2015,2016 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -35,7 +35,7 @@ class test_packet_format_fb(gr_unittest.TestCase):
def test_packet_format_async_default(self):
ac = packet_utils.default_access_code
- formatter = digital.packet_formatter_default(ac)
+ formatter = digital.packet_formatter_default(ac, 0)
pkt_header = digital.packet_format_async(formatter)
snk_hdr = blocks.message_debug()
@@ -83,7 +83,7 @@ class test_packet_format_fb(gr_unittest.TestCase):
def test_packet_format_async_counter(self):
bps = 2
ac = packet_utils.default_access_code
- formatter = digital.packet_formatter_counter(ac, 2)
+ formatter = digital.packet_formatter_counter(ac, 0, 2)
pkt_header = digital.packet_format_async(formatter)
snk_hdr = blocks.message_debug()
- [Commit-gnuradio] [gnuradio] branch packet2 created (now 93acb5b), git, 2016/06/13
- [Commit-gnuradio] [gnuradio] 11/24: digital: fixed packet parser QA tests,
git <=
- [Commit-gnuradio] [gnuradio] 04/24: digital: Cleaning up some of the packet parsing code., git, 2016/06/13
- [Commit-gnuradio] [gnuradio] 12/24: blocks: Adds a multiple (complex only) block that responds to tags., git, 2016/06/13
- [Commit-gnuradio] [gnuradio] 13/24: digital: Dealing with scaling issues with corr_est., git, 2016/06/13
- [Commit-gnuradio] [gnuradio] 09/24: digital: Removed parse_soft and packet_parse_f., git, 2016/06/13
- [Commit-gnuradio] [gnuradio] 15/24: digital: wip: packet formatters specify payload in symbols, not bits., git, 2016/06/13
- [Commit-gnuradio] [gnuradio] 03/24: Adding new test block to adjust the sample rate of a stream and make sure tags are being placed in the correct locations., git, 2016/06/13
- [Commit-gnuradio] [gnuradio] 06/24: digital: updates to packet_formatter classes and parsing blocks., git, 2016/06/13
- [Commit-gnuradio] [gnuradio] 08/24: digital: fixing PFB clock sync block handling of tags., git, 2016/06/13
- [Commit-gnuradio] [gnuradio] 23/24: digital: Fixing QA code for testing header formatter/parsers., git, 2016/06/13
- [Commit-gnuradio] [gnuradio] 14/24: digital: wip: pfb_clock_sync_ccf tag offset update., git, 2016/06/13