[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 18/24: digital: fixing up some of the packe
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 18/24: digital: fixing up some of the packet formatters since the new base class. |
Date: |
Tue, 14 Jun 2016 00:41:01 +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 f5e4bd0ffe64c87b1a34fdb60bfd0e51692d540f
Author: Tom Rondeau <address@hidden>
Date: Wed Apr 27 13:27:53 2016 -0400
digital: fixing up some of the packet formatters since the new base class.
---
gr-digital/grc/digital_packet_format_async.xml | 2 +-
.../include/gnuradio/digital/header_buffer.h | 2 +-
.../include/gnuradio/digital/packet_format_async.h | 26 ++++++++++------------
.../gnuradio/digital/packet_formatter_counter.h | 2 +-
gr-digital/lib/packet_format_async_impl.cc | 4 ++--
gr-digital/lib/packet_format_async_impl.h | 4 ++--
6 files changed, 19 insertions(+), 21 deletions(-)
diff --git a/gr-digital/grc/digital_packet_format_async.xml
b/gr-digital/grc/digital_packet_format_async.xml
index 95f6b4f..34c1918 100644
--- a/gr-digital/grc/digital_packet_format_async.xml
+++ b/gr-digital/grc/digital_packet_format_async.xml
@@ -1,5 +1,5 @@
<block>
- <name>Packet Header Formatter</name>
+ <name>Packet Header Formatter (Async)</name>
<key>digital_packet_format_async</key>
<import>from gnuradio import digital</import>
<make>digital.packet_format_async($formatter)</make>
diff --git a/gr-digital/include/gnuradio/digital/header_buffer.h
b/gr-digital/include/gnuradio/digital/header_buffer.h
index 263bc35..2ed010f 100644
--- a/gr-digital/include/gnuradio/digital/header_buffer.h
+++ b/gr-digital/include/gnuradio/digital/header_buffer.h
@@ -208,7 +208,7 @@ namespace gr {
* Add an 8-bit field to the header.
*
* \param data The 8-bit data item.
- * \param len Length (in bits) of \p data (here, always 1).
+ * \param len Length (in bits) of \p data.
* \param be Set to 'true' if data is already big endian.
*/
void add_field8(uint8_t data, int len=8, bool be=false);
diff --git a/gr-digital/include/gnuradio/digital/packet_format_async.h
b/gr-digital/include/gnuradio/digital/packet_format_async.h
index 2f32065..c846c8c 100644
--- a/gr-digital/include/gnuradio/digital/packet_format_async.h
+++ b/gr-digital/include/gnuradio/digital/packet_format_async.h
@@ -25,7 +25,7 @@
#define INCLUDED_DIGITAL_PACKET_FORMAT_ASYNC_H
#include <gnuradio/digital/api.h>
-#include <gnuradio/digital/packet_formatter_default.h>
+#include <gnuradio/digital/packet_formatter_base.h>
#include <gnuradio/block.h>
namespace gr {
@@ -44,18 +44,19 @@ namespace gr {
*
* The header that is created and transmitted out of the 'header'
* message port as a PDU. The header is based entirely on the \p
- * formatter, which is a packet_formatter_default or a child
- * class. All of these packet header formatters operate the same:
- * they take in the payload data as well as possible extra
- * metadata info about the PDU; the formatter then returns the
- * output PDU as a PMT argument along with any changes to the
- * metadata info PMT.
+ * formatter, which is an object derived from the
+ * packet_formatter_base class. All of these packet header
+ * formatters operate the same: they take in the payload data as
+ * well as possible extra metadata info about the PDU; the
+ * formatter then returns the output PDU as a PMT argument along
+ * with any changes to the metadata info PMT.
*
* For different packet header formatting needs, we can define new
- * classes that inherit from the packet_formatter_default block
- * and which overload the packet_formatter_default::format
+ * classes that inherit from the packet_formatter_base block
+ * and which overload the packet_formatter_base::format
* function.
*
+ * \sa packet_formatter_base
* \sa packet_formatter_default
* \sa packet_formatter_counter
*
@@ -75,12 +76,9 @@ namespace gr {
* Make a packet header block using a given \p formatter.
*
* \param formatter The formatter class to use when creating the
- * header for the packet. The default formatter is
- * packet_formatter_default and just applies an access
- * code and a header that repeats the PDU's frame length
- * twice.
+ * header for the packet.
*/
- static sptr make(const packet_formatter_default::sptr &formatter);
+ static sptr make(const packet_formatter_base::sptr &formatter);
};
} // namespace digital
diff --git a/gr-digital/include/gnuradio/digital/packet_formatter_counter.h
b/gr-digital/include/gnuradio/digital/packet_formatter_counter.h
index 941dd02..f9fe7df 100644
--- a/gr-digital/include/gnuradio/digital/packet_formatter_counter.h
+++ b/gr-digital/include/gnuradio/digital/packet_formatter_counter.h
@@ -1,5 +1,5 @@
/* -*- c++ -*- */
-/* Copyright 2014 Free Software Foundation, Inc.
+/* Copyright 2015-2016 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
diff --git a/gr-digital/lib/packet_format_async_impl.cc
b/gr-digital/lib/packet_format_async_impl.cc
index 2f1ccdc..6729e48 100644
--- a/gr-digital/lib/packet_format_async_impl.cc
+++ b/gr-digital/lib/packet_format_async_impl.cc
@@ -33,13 +33,13 @@ namespace gr {
namespace digital {
packet_format_async::sptr
- packet_format_async::make(const packet_formatter_default::sptr &formatter)
+ packet_format_async::make(const packet_formatter_base::sptr &formatter)
{
return gnuradio::get_initial_sptr
(new packet_format_async_impl(formatter));
}
- packet_format_async_impl::packet_format_async_impl(const
packet_formatter_default::sptr &formatter)
+ packet_format_async_impl::packet_format_async_impl(const
packet_formatter_base::sptr &formatter)
: block("packet_format_async",
io_signature::make(0, 0, 0),
io_signature::make(0, 0, 0))
diff --git a/gr-digital/lib/packet_format_async_impl.h
b/gr-digital/lib/packet_format_async_impl.h
index 2792a25..ab6fc68 100644
--- a/gr-digital/lib/packet_format_async_impl.h
+++ b/gr-digital/lib/packet_format_async_impl.h
@@ -32,7 +32,7 @@ namespace gr {
: public packet_format_async
{
private:
- packet_formatter_default::sptr d_formatter;
+ packet_formatter_base::sptr d_formatter;
pmt::pmt_t d_in_port;
pmt::pmt_t d_hdr_port, d_pld_port;
@@ -40,7 +40,7 @@ namespace gr {
void append(pmt::pmt_t msg);
public:
- packet_format_async_impl(const packet_formatter_default::sptr
&formatter);
+ packet_format_async_impl(const packet_formatter_base::sptr &formatter);
~packet_format_async_impl();
};
- [Commit-gnuradio] [gnuradio] 04/24: digital: Cleaning up some of the packet parsing code., (continued)
- [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
- [Commit-gnuradio] [gnuradio] 18/24: digital: fixing up some of the packet formatters since the new base class.,
git <=
- [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
- [Commit-gnuradio] [gnuradio] 19/24: digital: adding more support for packet formatters., git, 2016/06/13
- [Commit-gnuradio] [gnuradio] 10/24: digital: Redid packet formatter class hierarchy., git, 2016/06/13
- [Commit-gnuradio] [gnuradio] 01/24: digital: New packet management classes., git, 2016/06/13
- [Commit-gnuradio] [gnuradio] 21/24: digital: adding packet_formatter_ofdm to replace packet_header_ofdm., git, 2016/06/13
- [Commit-gnuradio] [gnuradio] 22/24: digital: refactoring formatting/parsing code., git, 2016/06/13
- [Commit-gnuradio] [gnuradio] 02/24: digital: adding examples for using packet utilities., git, 2016/06/13