[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 15/24: digital: wip: packet formatters spec
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 15/24: digital: wip: packet formatters specify payload in symbols, not bits. |
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 13ba571957728ee28858b96a74716749c80a0a59
Author: Tom Rondeau <address@hidden>
Date: Mon Apr 11 17:36:30 2016 -0400
digital: wip: packet formatters specify payload in symbols, not bits.
The counter version knows the bits/symbol value and can use this.
---
gr-digital/include/gnuradio/digital/packet_formatter_default.h | 8 +++++---
gr-digital/lib/packet_formatter_counter.cc | 4 ++--
gr-digital/lib/packet_formatter_default.cc | 2 +-
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/gr-digital/include/gnuradio/digital/packet_formatter_default.h
b/gr-digital/include/gnuradio/digital/packet_formatter_default.h
index e2501a4..ddfad04 100644
--- a/gr-digital/include/gnuradio/digital/packet_formatter_default.h
+++ b/gr-digital/include/gnuradio/digital/packet_formatter_default.h
@@ -68,9 +68,11 @@ namespace gr {
* contains the following keys. All formatter blocks MUST produce
* these two values in any dictionary.
*
- * \li "payload bits": the number of bits in the payload. The
- * payload decoder will have to know how this relates to the
- * number of symbols received.
+ * \li "payload symbols": the number of symbols in the
+ * payload. The payload decoder will have to know how this relates
+ * to the number of bits received. This block knows nothing about
+ * the payload modulation or the number of bits/symbol. Use the
+ * gr::digital::packet_formatter_counter for that purpose.
*
* \sa packet_formatter_counter
* \sa packet_formatter_1
diff --git a/gr-digital/lib/packet_formatter_counter.cc
b/gr-digital/lib/packet_formatter_counter.cc
index f304770..e132b34 100644
--- a/gr-digital/lib/packet_formatter_counter.cc
+++ b/gr-digital/lib/packet_formatter_counter.cc
@@ -107,8 +107,8 @@ namespace gr {
d_bps = bps;
d_info = pmt::make_dict();
- d_info = pmt::dict_add(d_info, pmt::intern("payload bits"),
- pmt::from_long(8*len));
+ d_info = pmt::dict_add(d_info, pmt::intern("payload symbols"),
+ pmt::from_long(8*len / d_bps));
d_info = pmt::dict_add(d_info, pmt::intern("bps"),
pmt::from_long(bps));
d_info = pmt::dict_add(d_info, pmt::intern("counter"),
diff --git a/gr-digital/lib/packet_formatter_default.cc
b/gr-digital/lib/packet_formatter_default.cc
index e9f9812..64ccd06 100644
--- a/gr-digital/lib/packet_formatter_default.cc
+++ b/gr-digital/lib/packet_formatter_default.cc
@@ -213,7 +213,7 @@ namespace gr {
uint16_t len = d_hdr_reg.extract_field16(0, 16);
d_info = pmt::make_dict();
- d_info = pmt::dict_add(d_info, pmt::intern("payload bits"),
+ d_info = pmt::dict_add(d_info, pmt::intern("payload symbols"),
pmt::from_long(8*len));
return static_cast<int>(len);
}
- [Commit-gnuradio] [gnuradio] branch packet2 created (now 93acb5b), git, 2016/06/13
- [Commit-gnuradio] [gnuradio] 11/24: digital: fixed packet parser QA tests, git, 2016/06/13
- [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 <=
- [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
- [Commit-gnuradio] [gnuradio] 18/24: digital: fixing up some of the packet formatters since the new base class., git, 2016/06/13
- [Commit-gnuradio] [gnuradio] 17/24: docs: Adding documentation for packet comms, git, 2016/06/13
- [Commit-gnuradio] [gnuradio] 07/24: digital: Updates to corr_est block., git, 2016/06/13
- [Commit-gnuradio] [gnuradio] 20/24: digital: fixed packet_parse from using default formatter to base class, git, 2016/06/13
- [Commit-gnuradio] [gnuradio] 24/24: digital: fixed up some header_buffer issues and added QA., git, 2016/06/13