commit-gnuradio
[Top][All Lists]
Advanced

[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();
     };
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]