commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 10/24: digital: Redid packet formatter clas


From: git
Subject: [Commit-gnuradio] [gnuradio] 10/24: digital: Redid packet formatter class hierarchy.
Date: Tue, 14 Jun 2016 00:40:57 +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 208515879f8c642083f76edba0ab833d910ec074
Author: Tom Rondeau <address@hidden>
Date:   Fri Apr 8 16:20:34 2016 -0400

    digital: Redid packet formatter class hierarchy.
    
    Creates a new packet_formatter_base that all other formatter classes
    should now inherit from. packet_formatter_default does, though
    packet_formatter_counter still inherits from the default since they
    share a lot of functionality.
    
    Base class has some pure virtual functions that requires the child to
    overload them to do the right thing, so this just sets up the basic
    structure for all formatter classes.
---
 ...cket_parse_x.xml => digital_packet_parse_b.xml} |  11 +-
 .../grc/variable_packet_formatter_default.xml      |  37 ++--
 gr-digital/include/gnuradio/digital/CMakeLists.txt |   1 +
 ...formatter_default.h => packet_formatter_base.h} | 202 ++++++++-------------
 .../gnuradio/digital/packet_formatter_counter.h    |  21 ++-
 .../gnuradio/digital/packet_formatter_default.h    |  90 ++-------
 .../include/gnuradio/digital/packet_parse_b.h      |  37 +---
 gr-digital/lib/CMakeLists.txt                      |   1 +
 gr-digital/lib/packet_formatter_base.cc            |  70 +++++++
 gr-digital/lib/packet_formatter_counter.cc         |  16 +-
 gr-digital/lib/packet_formatter_default.cc         |  37 ++--
 gr-digital/lib/packet_parse_b_impl.cc              |  24 +--
 gr-digital/lib/packet_parse_b_impl.h               |   5 +-
 gr-digital/lib/qa_packet_formatters.cc             | 158 +---------------
 gr-digital/lib/qa_packet_formatters.h              |   2 -
 gr-digital/swig/digital_swig.i                     |   2 +
 gr-digital/swig/packet_header.i                    |   2 +
 17 files changed, 243 insertions(+), 473 deletions(-)

diff --git a/gr-digital/grc/digital_packet_parse_x.xml 
b/gr-digital/grc/digital_packet_parse_b.xml
similarity index 63%
rename from gr-digital/grc/digital_packet_parse_x.xml
rename to gr-digital/grc/digital_packet_parse_b.xml
index db9448e..25f7b6a 100644
--- a/gr-digital/grc/digital_packet_parse_x.xml
+++ b/gr-digital/grc/digital_packet_parse_b.xml
@@ -2,7 +2,7 @@
   <name>Packet Parser</name>
   <key>digital_packet_parse_b</key>
   <import>from gnuradio import digital</import>
-  <make>digital.packet_parse_b($formatter, $threshold)</make>
+  <make>digital.packet_parse_b($formatter)</make>
 
   <param>
     <name>Formatter</name>
@@ -10,16 +10,9 @@
     <type>raw</type>
   </param>
 
-  <param>
-    <name>Threshold</name>
-    <key>threshold</key>
-    <value>0</value>
-    <type>int</type>
-  </param>
-
   <sink>
     <name>in</name>
-    <type>$type.input</type>
+    <type>byte</type>
   </sink>
 
   <source>
diff --git a/gr-digital/grc/variable_packet_formatter_default.xml 
b/gr-digital/grc/variable_packet_formatter_default.xml
index 7ba27fa..106cff6 100644
--- a/gr-digital/grc/variable_packet_formatter_default.xml
+++ b/gr-digital/grc/variable_packet_formatter_default.xml
@@ -5,24 +5,31 @@
 ###################################################
  -->
 <block>
-    <name>Default Packet Header Definition</name>
-    <key>variable_packet_formatter_default</key>
-    <import>from gnuradio import digital</import>
-    <var_make>
+  <name>Default Packet Header Definition</name>
+  <key>variable_packet_formatter_default</key>
+  <import>from gnuradio import digital</import>
+  <var_make>
 #if int($access_code())==0 #
-self.$(id) = $(id) = 
digital.packet_formatter_default(digital.packet_utils.default_access_code)
+self.$(id) = $(id) = 
digital.packet_formatter_default(digital.packet_utils.default_access_code, 
$threshold)
 #else
-self.$(id) = $(id) = digital.packet_formatter_default($access_code)
+self.$(id) = $(id) = digital.packet_formatter_default($access_code, $threshold)
 #end if
-    </var_make>
-    <var_value>digital.packet_formatter_default($access_code)</var_value>
-    <make></make>
+  </var_make>
+  <var_value>digital.packet_formatter_default($access_code, 
$threshold)</var_value>
+  <make></make>
 
-    <param>
-        <name>Access Code</name>
-        <key>access_code</key>
-        <value>0</value>
-        <type>string</type>
-    </param>
+  <param>
+    <name>Access Code</name>
+    <key>access_code</key>
+    <value>0</value>
+    <type>string</type>
+  </param>
+
+  <param>
+    <name>Threshold</name>
+    <key>threshold</key>
+    <value>0</value>
+    <type>int</type>
+  </param>
 
 </block>
diff --git a/gr-digital/include/gnuradio/digital/CMakeLists.txt 
b/gr-digital/include/gnuradio/digital/CMakeLists.txt
index 546d80c..d6bde75 100644
--- a/gr-digital/include/gnuradio/digital/CMakeLists.txt
+++ b/gr-digital/include/gnuradio/digital/CMakeLists.txt
@@ -91,6 +91,7 @@ install(FILES
     ofdm_sampler.h
     ofdm_serializer_vcc.h
     ofdm_sync_sc_cfb.h
+    packet_formatter_base.h
     packet_formatter_default.h
     packet_formatter_counter.h
     packet_format_async.h
diff --git a/gr-digital/include/gnuradio/digital/packet_formatter_default.h 
b/gr-digital/include/gnuradio/digital/packet_formatter_base.h
similarity index 52%
copy from gr-digital/include/gnuradio/digital/packet_formatter_default.h
copy to gr-digital/include/gnuradio/digital/packet_formatter_base.h
index e8026a6..baf4f10 100644
--- a/gr-digital/include/gnuradio/digital/packet_formatter_default.h
+++ b/gr-digital/include/gnuradio/digital/packet_formatter_base.h
@@ -1,5 +1,5 @@
 /* -*- c++ -*- */
-/* Copyright 2014-2015 Free Software Foundation, Inc.
+/* Copyright 2016 Free Software Foundation, Inc.
  *
  * This file is part of GNU Radio
  *
@@ -19,8 +19,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#ifndef INCLUDED_DIGITAL_PACKET_FORMATTER_DEFAULT_H
-#define INCLUDED_DIGITAL_PACKET_FORMATTER_DEFAULT_H
+#ifndef INCLUDED_DIGITAL_PACKET_FORMATTER_BASE_H
+#define INCLUDED_DIGITAL_PACKET_FORMATTER_BASE_H
 
 #include <pmt/pmt.h>
 #include <gnuradio/digital/api.h>
@@ -32,21 +32,60 @@ namespace gr {
   namespace digital {
 
     /*!
-     * \brief Default header formatter for PDU formatting.
+     * \brief Base header formatter class.
      * \ingroup packet_operators_blk
      *
      * \details
-
-     * Used to handle the default packet header. The formatters manage
-     * two functions:
      *
-     * \li packet_formatter_default::format: takes in a
-     * payload and creates a header from it.
+     * Creates a base class that other packet formatters will inherit
+     * from. The child classes create and parse protocol-specific
+     * headers. To add a new protocol processing class, create a class
+     * that inherits from this and overload the necessary
+     * functions. The main functions to overload are:
+     *
+     * \li packet_formatter_base::format: takes in a payload and
+     * creates a header from it.
      *
-     * \li packet_formatter_default::parse receive bits and extract
+     * \li packet_formatter_base::parse: receive bits and extract
      * the header info. These are expected to be hard bits (0 or 1)
      * that have either been sliced or gone through an FEC decoder.
      *
+     * \li packet_formatter_base::header_nbits: the number of bits
+     * in the full header (including an access code).
+     *
+     * \li packet_formatter_base::header_ok: checks to see if the
+     * received header is ok. Since the header often specifies the
+     * length of the frame to decode next, it is important that this
+     * information be correct.
+     *
+     * \li packet_formatter_base::header_payload: unpacks the header
+     * register (from the class header_buffer) as a set of bits into
+     * its component parts of the header. For example, this may find
+     * and extract the frame length field as a 16-bit value and/or
+     * flags related to the type of modulation and FEC codes used in
+     * the frame's payload.
+     *
+     * Protected functions of this class that the child class should
+     * overload include:
+     *
+     * \li enter_search
+     * \li enter_have_sync
+     * \li enter_have_header
+     *
+     * These three function represent the different states of the
+     * parsing state machine. Expected behavior is that the protocol
+     * has some known word that we are first looking for the identify
+     * the start of the frame. The parsing FSM starts in a state to
+     * search for the beginning of the header, normally by looking for
+     * a known word (i.e., the access code). Then it changes state to
+     * read in the full header. We expect that the protocol provides
+     * the length of the header for processing, so the parsing looks
+     * pulls in the full length of the header. Then it changes state
+     * to the "have header" state for checking and processing. The
+     * base class provides the basic functionality for this state
+     * machine. However, most likely, each child class must manage
+     * these states for themselves.
+     *
      * This class is specifically designed to work with packets/frames
      * in the asynchronous PDU architecture of GNU Radio. See the
      * packet_format_async block for formatting the headers onto
@@ -78,64 +117,24 @@ namespace gr {
      * format, parse, and parsing state machine functions as
      * necessary.
      *
-     * The default header created in this base class consists of an
-     * access code and the packet length. The length is encoded as a
-     * 16-bit value repeated twice:
-     *
-     * \verbatim
-         | access code | hdr | payload |
-       \endverbatim
-     *
-     * Where the access code is <= 64 bits and hdr is:
-     *
-     * \verbatim
-         |  0 -- 15 | 16 -- 31 |
-         | pkt len  | pkt len  |
-       \endverbatim
-     *
-     * The access code and header are formatted for network byte order.
-     *
-     * This header generator does not calculate or append a CRC to the
-     * packet. Use the CRC32 Async block for that before adding the
-     * header. The header's length will then measure the payload plus
-     * the CRC length (4 bytes for a CRC32).
-     *
-     * The default header parser produces a PMT dictionary that
-     * contains the following keys. All formatter blocks MUST produce
-     * these two values in any dictionary.
-     *
-     * \li "skip samps": the number of samples between the end of the
-     * last payload and the beginning of this payload. This is used by
-     * a decoder block to know where in the payload to begin
-     * demodulating the payload.
-     *
-     * \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.
-     *
+     * \sa packet_formatter_default
      * \sa packet_formatter_counter
-     * \sa packet_formatter_1
-     * \sa packet_formatter_ofdm
      */
-    class DIGITAL_API packet_formatter_default
-      : public 
boost::enable_shared_from_this<gr::digital::packet_formatter_default>
+    class DIGITAL_API packet_formatter_base
+      : public 
boost::enable_shared_from_this<gr::digital::packet_formatter_base>
     {
      public:
-      typedef boost::shared_ptr<packet_formatter_default> sptr;
+      typedef boost::shared_ptr<packet_formatter_base> sptr;
 
-      packet_formatter_default(const std::string &access_code);
-      virtual ~packet_formatter_default();
+      packet_formatter_base();
+      virtual ~packet_formatter_base();
 
       sptr base() { return shared_from_this(); };
       sptr formatter() { return shared_from_this(); };
 
       /*!
-       * Creates a header from the access code and packet length and
-       * creates an output header as a PMT vector in the form:
-       *
-       * \verbatim
-           | access code | pkt len | pkt len |
-         \endverbatim
+       * Function to creates a header. The child classes overload this
+       * function to format the header in the protocol-specific way.
        *
        * \param nbytes_in The length (in bytes) of the \p input payload
        * \param input An array of unsigned chars of the packet payload
@@ -145,28 +144,18 @@ namespace gr {
        *        the PDU (generally from the metadata portion of the
        *        input PDU). Data can be extracted from this for the
        *        header formatting or inserted.
+       *
+       * MUST be overloaded.
        */
       virtual bool format(int nbytes_in,
                           const unsigned char *input,
                           pmt::pmt_t &output,
-                          pmt::pmt_t &info);
+                          pmt::pmt_t &info) = 0;
 
       /*!
-       * Parses a header of the form:
-       *
-       * \verbatim
-           | access code | pkt len | pkt len | payload |
-         \endverbatim
-       *
-       * This is implemented as a state machine that starts off
-       * searching for the access code. Once found, the access code is
-       * used to find the start of the packet and the following
-       * header. This default header encodes the length of the payload
-       * a 16 bit integer twice. The state machine finds the header
-       * and checks that both payload length values are the same. It
-       * then goes into its final state that reads in the payload
-       * (based on the payload length) and produces a payload as a PMT
-       * u8 vector of packed bytes.
+       * Parses a header. This function is overloaded in the child
+       * class, which knows how to convert the incoming hard bits (0's
+       * and 1's) back into a packet header.
        *
        * \param nbits_in The number of bits in the input array.
        * \param input The input as hard decision bits.
@@ -180,71 +169,32 @@ namespace gr {
        *        processed; If all goes well, this is nbits_in. A
        *        premature return after a bad header could be less than
        *        this.
+       *
+       * MUST be overloaded.
        */
       virtual bool parse(int nbits_in,
                          const unsigned char *input,
                          std::vector<pmt::pmt_t> &info,
-                         int &nbits_processed);
+                         int &nbits_processed) = 0;
 
       /*!
        * Returns the length of the formatted header in bits.
+       * MUST be overloaded.
        */
-      virtual size_t header_nbits() const;
+      virtual size_t header_nbits() const = 0;
 
       /*!
        * Returns the length of the formatted header in bytes.
+       * Auto-calculated from the overloaded header_nbits().
        */
-      virtual size_t header_nbytes() const;
-
-      /*!
-       * Updates the access code. Must be a string of 1's and 0's and
-       * <= 64 bits.
-       */
-      bool set_access_code(const std::string &access_code);
-
-      /*!
-       * Returns the formatted access code as a 64-bit register.
-       */
-      unsigned long long access_code() const;
-
-      /*!
-       * Sets the threshold for number of access code bits can be in
-       * error before detection. Defaults to 0.
-       */
-      void set_threshold(unsigned int thresh=0);
-
-      /*!
-       * Returns threshold value for access code detection.
-       */
-      unsigned int threshold() const;
-
-      /*!
-       * Factory to create an async packet header formatter; returns
-       * an sptr to the object.
-       */
-      static sptr make(const std::string &access_code);
+      size_t header_nbytes() const;
 
     protected:
       enum state_t {STATE_SYNC_SEARCH, STATE_HAVE_SYNC};
 
-      uint64_t d_access_code;        //!< register to hold the access code
-      size_t d_access_code_len;      //!< length in bits of the access code
-
-      state_t d_state;               //!< state of the state machine
-      unsigned long long d_data_reg; //!< used to look for access_code
-      unsigned long long d_mask;     /*!< masks access_code bits (top N bits 
are set where
-                                       N is the number of bits in the access 
code) */
-      unsigned int d_threshold;      //!< how many bits may be wrong in sync 
vector
-
-      header_buffer d_hdr_reg;
-
-      int d_pkt_len;                 //!< Length of the packet to put into the 
output buffer
-      int d_pkt_count;               //!< Number of bytes bits already received
-      pmt::pmt_t d_info;             //!< info captured from the header
-
-      uint16_t d_bps;                //!< bits/sec of payload modulation
-
-      int d_nbits;                   //!< num bits processed since reset
+      state_t d_state;          //!< state of the state machine
+      header_buffer d_hdr_reg;  //!< header_buffer object to hold header bits
+      pmt::pmt_t d_info;        //!< info captured from the header
 
       //! Enter Search state of the state machine to find the access code.
       virtual void enter_search();
@@ -256,12 +206,12 @@ namespace gr {
       virtual void enter_have_header(int payload_len);
 
       //! Verify that the header is valid
-      virtual bool header_ok();
+      virtual bool header_ok() = 0;
 
       /*! Get info from the header; return payload length and package
        *  rest of data in d_info dictionary.
        */
-      virtual int header_payload();
+      virtual int header_payload() = 0;
 
       /*! Used by blocks to access the logger system.
        */
@@ -272,4 +222,4 @@ namespace gr {
   } // namespace digital
 } // namespace gr
 
-#endif /* INCLUDED_DIGITAL_PACKET_FORMATTER_DEFAULT_H */
+#endif /* INCLUDED_DIGITAL_PACKET_FORMATTER_BASE_H */
diff --git a/gr-digital/include/gnuradio/digital/packet_formatter_counter.h 
b/gr-digital/include/gnuradio/digital/packet_formatter_counter.h
index 30578b1..941dd02 100644
--- a/gr-digital/include/gnuradio/digital/packet_formatter_counter.h
+++ b/gr-digital/include/gnuradio/digital/packet_formatter_counter.h
@@ -63,7 +63,8 @@ namespace gr {
       : public packet_formatter_default
     {
      public:
-      packet_formatter_counter(const std::string &access_code, int bps);
+      packet_formatter_counter(const std::string &access_code,
+                               int threshold, int bps);
       virtual ~packet_formatter_counter();
 
       /*!
@@ -94,18 +95,24 @@ namespace gr {
       virtual size_t header_nbits() const;
 
       /*!
-       * Returns the length of the formatted header in bytes.
-       */
-      virtual size_t header_nbytes() const;
-
-      /*!
        * Factory to create an async packet header formatter; returns
        * an sptr to the object.
+       *
+       * \param access_code An access code that is used to find and
+       * synchronize the start of a packet. Used in the parser and in
+       * other blocks like a corr_est block that helps trigger the
+       * receiver. Can be up to 64-bits long.
+       * \param threshold How many bits can be wrong in the access
+       * code and still count as correct.
+       * \param bps The number of bits/second used in the payload's
+       * modulator.
        */
-      static sptr make(const std::string &access_code, int bps);
+      static sptr make(const std::string &access_code,
+                       int threshold, int bps);
 
     protected:
       uint16_t d_counter;    //!< keeps track of the number of packets 
transmitted
+      uint16_t d_bps;        //!< bits/sec of payload modulation
 
       //! Verify that the header is valid
       bool header_ok();
diff --git a/gr-digital/include/gnuradio/digital/packet_formatter_default.h 
b/gr-digital/include/gnuradio/digital/packet_formatter_default.h
index e8026a6..e2501a4 100644
--- a/gr-digital/include/gnuradio/digital/packet_formatter_default.h
+++ b/gr-digital/include/gnuradio/digital/packet_formatter_default.h
@@ -1,5 +1,5 @@
 /* -*- c++ -*- */
-/* Copyright 2014-2015 Free Software Foundation, Inc.
+/* Copyright 2015-2016 Free Software Foundation, Inc.
  *
  * This file is part of GNU Radio
  *
@@ -24,6 +24,7 @@
 
 #include <pmt/pmt.h>
 #include <gnuradio/digital/api.h>
+#include <gnuradio/digital/packet_formatter_base.h>
 #include <gnuradio/digital/header_buffer.h>
 #include <gnuradio/logger.h>
 #include <boost/enable_shared_from_this.hpp>
@@ -36,47 +37,10 @@ namespace gr {
      * \ingroup packet_operators_blk
      *
      * \details
-
-     * Used to handle the default packet header. The formatters manage
-     * two functions:
-     *
-     * \li packet_formatter_default::format: takes in a
-     * payload and creates a header from it.
-     *
-     * \li packet_formatter_default::parse receive bits and extract
-     * the header info. These are expected to be hard bits (0 or 1)
-     * that have either been sliced or gone through an FEC decoder.
-     *
-     * This class is specifically designed to work with packets/frames
-     * in the asynchronous PDU architecture of GNU Radio. See the
-     * packet_format_async block for formatting the headers onto
-     * payloads and packet_parse_b block for parsing headers in a
-     * receiver.
-     *
-     * The Packet Format block takes in a PDU and uses a formatter
-     * class derived from this class to add a header onto the
-     * packet. The Packet Format blocks takes in the PDU, unpacks the
-     * message, and passes it to a formatter class' format function,
-     * which builds a header based on the payload. The header is
-     * passed back and emitted from formatter block as a separate
-     * output. The async format block, packet_format_async, has two
-     * message output ports. The 'header' port passes the header out
-     * as a PDU and the 'payload' passes the payload out as a PDU. The
-     * flowgraph can then separately modulate and combine these two
-     * pieces in the follow-on processing.
+     * Used to handle the default packet header.
      *
-     * The packet_sync_b block uses the formatter class by calling the
-     * 'parse' function to parse the received packet headers. This
-     * parser block is a sink for the data stream and emits a message
-     * from an 'info' port that contains an PMT dictionary of the
-     * information in the header. The formatter class determines the
-     * dictionary keys.
-     *
-     * This is the base class for dealing with formatting headers for
-     * different protocols and purposes. For other header formatting
-     * behaviors, create a child class from here and overload the
-     * format, parse, and parsing state machine functions as
-     * necessary.
+     * See the parent class packet_formatter_base for details of how
+     * these classes operate.
      *
      * The default header created in this base class consists of an
      * access code and the packet length. The length is encoded as a
@@ -104,11 +68,6 @@ namespace gr {
      * contains the following keys. All formatter blocks MUST produce
      * these two values in any dictionary.
      *
-     * \li "skip samps": the number of samples between the end of the
-     * last payload and the beginning of this payload. This is used by
-     * a decoder block to know where in the payload to begin
-     * demodulating the payload.
-     *
      * \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.
@@ -118,17 +77,12 @@ namespace gr {
      * \sa packet_formatter_ofdm
      */
     class DIGITAL_API packet_formatter_default
-      : public 
boost::enable_shared_from_this<gr::digital::packet_formatter_default>
+      : public packet_formatter_base
     {
      public:
-      typedef boost::shared_ptr<packet_formatter_default> sptr;
-
-      packet_formatter_default(const std::string &access_code);
+      packet_formatter_default(const std::string &access_code, int threshold);
       virtual ~packet_formatter_default();
 
-      sptr base() { return shared_from_this(); };
-      sptr formatter() { return shared_from_this(); };
-
       /*!
        * Creates a header from the access code and packet length and
        * creates an output header as a PMT vector in the form:
@@ -192,11 +146,6 @@ namespace gr {
       virtual size_t header_nbits() const;
 
       /*!
-       * Returns the length of the formatted header in bytes.
-       */
-      virtual size_t header_nbytes() const;
-
-      /*!
        * Updates the access code. Must be a string of 1's and 0's and
        * <= 64 bits.
        */
@@ -221,34 +170,30 @@ namespace gr {
       /*!
        * Factory to create an async packet header formatter; returns
        * an sptr to the object.
+       *
+       * \param access_code An access code that is used to find and
+       * synchronize the start of a packet. Used in the parser and in
+       * other blocks like a corr_est block that helps trigger the
+       * receiver. Can be up to 64-bits long.
+       * \param threshold How many bits can be wrong in the access
+       * code and still count as correct.
        */
-      static sptr make(const std::string &access_code);
+      static sptr make(const std::string &access_code, int threshold);
 
     protected:
-      enum state_t {STATE_SYNC_SEARCH, STATE_HAVE_SYNC};
-
       uint64_t d_access_code;        //!< register to hold the access code
       size_t d_access_code_len;      //!< length in bits of the access code
 
-      state_t d_state;               //!< state of the state machine
       unsigned long long d_data_reg; //!< used to look for access_code
       unsigned long long d_mask;     /*!< masks access_code bits (top N bits 
are set where
                                        N is the number of bits in the access 
code) */
       unsigned int d_threshold;      //!< how many bits may be wrong in sync 
vector
 
-      header_buffer d_hdr_reg;
-
       int d_pkt_len;                 //!< Length of the packet to put into the 
output buffer
       int d_pkt_count;               //!< Number of bytes bits already received
-      pmt::pmt_t d_info;             //!< info captured from the header
-
-      uint16_t d_bps;                //!< bits/sec of payload modulation
 
       int d_nbits;                   //!< num bits processed since reset
 
-      //! Enter Search state of the state machine to find the access code.
-      virtual void enter_search();
-
       //! Access code found, start getting the header
       virtual void enter_have_sync();
 
@@ -262,11 +207,6 @@ namespace gr {
        *  rest of data in d_info dictionary.
        */
       virtual int header_payload();
-
-      /*! Used by blocks to access the logger system.
-       */
-      gr::logger_ptr d_logger;
-      gr::logger_ptr d_debug_logger;
     };
 
   } // namespace digital
diff --git a/gr-digital/include/gnuradio/digital/packet_parse_b.h 
b/gr-digital/include/gnuradio/digital/packet_parse_b.h
index a87beb5..f0dee06 100644
--- a/gr-digital/include/gnuradio/digital/packet_parse_b.h
+++ b/gr-digital/include/gnuradio/digital/packet_parse_b.h
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2014 Free Software Foundation, Inc.
+ * Copyright 2015,2016 Free Software Foundation, Inc.
  *
  * This file is part of GNU Radio
  *
@@ -45,18 +45,14 @@ namespace gr {
      * code as a sync word to find the start of a frame.
      *
      * The block uses a formatter derived from a
-     * packet_formatter_default formatter class. The only thing
-     * this class is required to have in the header is an access code
-     * of up to 64 bits. This block uses the formatter and access code
-     * to do the frame synchronization. An access code is found if the
-     * received bits have fewer than \p threshold errors detected.
+     * packet_formatter_default formatter class.
      *
-     * Once the frame access code is detected, the block uses the
-     * formatter's parse_header to decode the remaining
-     * header. Generally, as in the default header case, the header
-     * will contain the length of the frame's payload. That and
-     * anything else in the header will generally go into the PDU's
-     * meta-data dictionary.
+     * Once the frame is detected (usually through the use of an
+     * access code), the block uses the formatter's parser to decode
+     * the remaining header. Generally, as in the default header case,
+     * the header will contain the length of the frame's payload. That
+     * and anything else in the header will generally go into the
+     * PDU's meta-data dictionary.
      *
      * The block will output a PDU that contains frame's header info
      * in the meta-data portion of the PDU and the payload itself. The
@@ -74,23 +70,8 @@ namespace gr {
        *
        * \param formatter The formatter class to use when reading the
        *        header.
-       * \param threshold How many bits in the access code the
-       *        \p formatter can miss and still trigger a hit.
        */
-      static sptr make(const packet_formatter_default::sptr &formatter,
-                       unsigned int threshold=0);
-
-      /*!
-       * Sets the threshold level for the formatter when finding the
-       * access code. See packet_formatter_default::set_threshold
-       * for more details.
-       */
-      virtual void set_threshold(unsigned int thresh) = 0;
-
-      /*!
-       * Gets the access code detection threshold from the formatter.
-       */
-      virtual unsigned int threshold() const = 0;
+      static sptr make(const packet_formatter_default::sptr &formatter);
     };
 
   } // namespace digital
diff --git a/gr-digital/lib/CMakeLists.txt b/gr-digital/lib/CMakeLists.txt
index 2d25c2d..b295938 100644
--- a/gr-digital/lib/CMakeLists.txt
+++ b/gr-digital/lib/CMakeLists.txt
@@ -107,6 +107,7 @@ list(APPEND digital_sources
     ofdm_sampler_impl.cc
     ofdm_serializer_vcc_impl.cc
     ofdm_sync_sc_cfb_impl.cc
+    packet_formatter_base.cc
     packet_formatter_default.cc
     packet_formatter_counter.cc
     packet_format_async_impl.cc
diff --git a/gr-digital/lib/packet_formatter_base.cc 
b/gr-digital/lib/packet_formatter_base.cc
new file mode 100644
index 0000000..e7666c0
--- /dev/null
+++ b/gr-digital/lib/packet_formatter_base.cc
@@ -0,0 +1,70 @@
+/* -*- c++ -*- */
+/* Copyright 2016 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <iostream>
+#include <string.h>
+#include <volk/volk.h>
+#include <gnuradio/digital/packet_formatter_base.h>
+#include <gnuradio/math.h>
+
+namespace gr {
+  namespace digital {
+
+    packet_formatter_base::packet_formatter_base()
+    {
+      enter_search();
+      configure_default_loggers(d_logger, d_debug_logger, "packet formatter");
+    }
+
+    packet_formatter_base::~packet_formatter_base()
+    {
+    }
+
+    size_t
+    packet_formatter_base::header_nbytes() const
+    {
+      return header_nbits() / 8;
+    }
+
+    inline void
+    packet_formatter_base::enter_search()
+    {
+      d_state = STATE_SYNC_SEARCH;
+    }
+
+    inline void
+    packet_formatter_base::enter_have_sync()
+    {
+      d_state = STATE_HAVE_SYNC;
+    }
+
+    inline void
+    packet_formatter_base::enter_have_header(int payload_len)
+    {
+      d_state = STATE_SYNC_SEARCH;
+    }
+
+  } /* namespace digital */
+} /* namespace gr */
diff --git a/gr-digital/lib/packet_formatter_counter.cc 
b/gr-digital/lib/packet_formatter_counter.cc
index e3e73d7..f304770 100644
--- a/gr-digital/lib/packet_formatter_counter.cc
+++ b/gr-digital/lib/packet_formatter_counter.cc
@@ -35,14 +35,16 @@ namespace gr {
   namespace digital {
 
     packet_formatter_counter::sptr
-    packet_formatter_counter::make(const std::string &access_code, int bps)
+    packet_formatter_counter::make(const std::string &access_code,
+                                   int threshold, int bps)
     {
       return packet_formatter_counter::sptr
-        (new packet_formatter_counter(access_code, bps));
+        (new packet_formatter_counter(access_code, threshold, bps));
     }
 
-    packet_formatter_counter::packet_formatter_counter(const std::string 
&access_code, int bps)
-      : packet_formatter_default(access_code)
+    packet_formatter_counter::packet_formatter_counter(const std::string 
&access_code,
+                                                       int threshold, int bps)
+      : packet_formatter_default(access_code, threshold)
     {
       d_bps = bps;
       d_counter = 0;
@@ -86,12 +88,6 @@ namespace gr {
       return d_access_code_len + 8*4*sizeof(uint16_t);
     }
 
-    size_t
-    packet_formatter_counter::header_nbytes() const
-    {
-      return d_access_code_len/8 + 4*sizeof(uint16_t);
-    }
-
     bool
     packet_formatter_counter::header_ok()
     {
diff --git a/gr-digital/lib/packet_formatter_default.cc 
b/gr-digital/lib/packet_formatter_default.cc
index c11768f..e9f9812 100644
--- a/gr-digital/lib/packet_formatter_default.cc
+++ b/gr-digital/lib/packet_formatter_default.cc
@@ -1,5 +1,5 @@
 /* -*- c++ -*- */
-/* Copyright 2014-2015 Free Software Foundation, Inc.
+/* Copyright 2015-2016 Free Software Foundation, Inc.
  *
  * This file is part of GNU Radio
  *
@@ -33,25 +33,24 @@ namespace gr {
   namespace digital {
 
     packet_formatter_default::sptr
-    packet_formatter_default::make(const std::string &access_code)
+    packet_formatter_default::make(const std::string &access_code,
+                                   int threshold)
     {
       return packet_formatter_default::sptr
-        (new packet_formatter_default(access_code));
+        (new packet_formatter_default(access_code, threshold));
     }
 
-    packet_formatter_default::packet_formatter_default(const std::string 
&access_code)
+    packet_formatter_default::packet_formatter_default(const std::string 
&access_code,
+                                                       int threshold)
+      : packet_formatter_base(),
+        d_data_reg(0), d_mask(0), d_threshold(0),
+        d_pkt_len(0), d_pkt_count(0), d_nbits(0)
     {
       if(!set_access_code(access_code)) {
         throw std::runtime_error("packet_formatter_default: Setting access 
code failed");
       }
 
-      d_pkt_len = 0;
-      enter_search();
-      d_threshold = 0;
-      d_data_reg = 0;
-      d_bps = 1; // set in child classes that use this
-
-      configure_default_loggers(d_logger, d_debug_logger, "packet formatter");
+      set_threshold(threshold);
     }
 
     packet_formatter_default::~packet_formatter_default()
@@ -63,7 +62,6 @@ namespace gr {
     {
       d_access_code_len = access_code.length();        // # of bits in the 
access code
 
-      //if((access_code.size() % 8 != 0) || (access_code.size() > 64)) {
       if(access_code.size() > 64) {
         return false;
       }
@@ -88,9 +86,10 @@ namespace gr {
     void
     packet_formatter_default::set_threshold(unsigned int thresh)
     {
-      if(d_threshold > d_access_code_len)
+      if(d_threshold > d_access_code_len) {
         throw std::runtime_error("packet_formatter_default: Cannot set 
threshold " \
                                  "larger than the access code length.");
+      }
       d_threshold = thresh;
     }
 
@@ -184,18 +183,6 @@ namespace gr {
       return d_access_code_len + 8*2*sizeof(uint16_t);
     }
 
-    size_t
-    packet_formatter_default::header_nbytes() const
-    {
-      return d_access_code_len/8 + 2*sizeof(uint16_t);
-    }
-
-    inline void
-    packet_formatter_default::enter_search()
-    {
-      d_state = STATE_SYNC_SEARCH;
-    }
-
     inline void
     packet_formatter_default::enter_have_sync()
     {
diff --git a/gr-digital/lib/packet_parse_b_impl.cc 
b/gr-digital/lib/packet_parse_b_impl.cc
index fb1a65c..1d2fb4f 100644
--- a/gr-digital/lib/packet_parse_b_impl.cc
+++ b/gr-digital/lib/packet_parse_b_impl.cc
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2014 Free Software Foundation, Inc.
+ * Copyright 2015,2016 Free Software Foundation, Inc.
  *
  * This file is part of GNU Radio
  *
@@ -34,22 +34,19 @@ namespace gr {
   namespace digital {
 
     packet_parse_b::sptr
-    packet_parse_b::make(const packet_formatter_default::sptr &formatter,
-                         unsigned int threshold)
+    packet_parse_b::make(const packet_formatter_base::sptr &formatter)
     {
       return gnuradio::get_initial_sptr
-       (new packet_parse_b_impl(formatter, threshold));
+       (new packet_parse_b_impl(formatter));
     }
 
 
-    packet_parse_b_impl::packet_parse_b_impl(const 
packet_formatter_default::sptr &formatter,
-                                             unsigned int threshold)
+    packet_parse_b_impl::packet_parse_b_impl(const packet_formatter_base::sptr 
&formatter)
       : sync_block("packet_parse_b",
                    io_signature::make(1, 1, sizeof(char)),
                    io_signature::make(0, 0, 0))
     {
       d_formatter = formatter;
-      set_threshold(threshold);
 
       d_out_port = pmt::mp("info");
       message_port_register_out(d_out_port);
@@ -59,19 +56,6 @@ namespace gr {
     {
     }
 
-    void
-    packet_parse_b_impl::set_threshold(unsigned int thresh)
-    {
-      d_formatter->set_threshold(thresh);
-    }
-
-
-    unsigned int
-    packet_parse_b_impl::threshold() const
-    {
-      return d_formatter->threshold();
-    }
-
     int
     packet_parse_b_impl::work(int noutput_items,
                               gr_vector_const_void_star &input_items,
diff --git a/gr-digital/lib/packet_parse_b_impl.h 
b/gr-digital/lib/packet_parse_b_impl.h
index 4263ca4..5a78187 100644
--- a/gr-digital/lib/packet_parse_b_impl.h
+++ b/gr-digital/lib/packet_parse_b_impl.h
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2014 Free Software Foundation, Inc.
+ * Copyright 2015,2016 Free Software Foundation, Inc.
  *
  * This file is part of GNU Radio
  *
@@ -35,8 +35,7 @@ namespace gr {
       pmt::pmt_t d_out_port;
 
      public:
-      packet_parse_b_impl(const packet_formatter_default::sptr &formatter,
-                          unsigned int threshold=0);
+      packet_parse_b_impl(const packet_formatter_default::sptr &formatter);
       ~packet_parse_b_impl();
 
       void set_threshold(unsigned int thresh);
diff --git a/gr-digital/lib/qa_packet_formatters.cc 
b/gr-digital/lib/qa_packet_formatters.cc
index 97696d7..e6cfb16 100644
--- a/gr-digital/lib/qa_packet_formatters.cc
+++ b/gr-digital/lib/qa_packet_formatters.cc
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2002,2013 Free Software Foundation, Inc.
+ * Copyright 2015,2016 Free Software Foundation, Inc.
  *
  * This file is part of GNU Radio
  *
@@ -53,7 +53,7 @@ qa_packet_formatters::test_default_format()
   }
 
   gr::digital::packet_formatter_default::sptr formatter;
-  formatter = gr::digital::packet_formatter_default::make(ac);
+  formatter = gr::digital::packet_formatter_default::make(ac, 0);
 
   pmt::pmt_t output;
   pmt::pmt_t info = pmt::make_dict();
@@ -115,8 +115,7 @@ qa_packet_formatters::test_default_parse()
 
   std::string ac = "1010101010101010"; //0xAAAA
   gr::digital::packet_formatter_default::sptr formatter;
-  formatter = gr::digital::packet_formatter_default::make(ac);
-  formatter->set_threshold(0);
+  formatter = gr::digital::packet_formatter_default::make(ac, 0);
 
   int count = 0;
   std::vector<pmt::pmt_t> info;
@@ -142,74 +141,6 @@ qa_packet_formatters::test_default_parse()
 }
 
 void
-qa_packet_formatters::test_default_parse_soft()
-{
-  static const int nbytes = 106;
-  static const int nbits = 8*nbytes;
-  unsigned char *bytes = (unsigned char*)volk_malloc(nbytes*sizeof(unsigned 
char),
-                                                     volk_get_alignment());
-  unsigned char *bits = (unsigned char*)volk_malloc(nbits*sizeof(unsigned 
char),
-                                                    volk_get_alignment());
-  float *soft = (float*)volk_malloc(nbits*sizeof(float),
-                                    volk_get_alignment());
-
-  srand(time(NULL));
-
-  // Fill bytes with random values
-  for(unsigned int i = 0; i < nbytes; i++) {
-    bytes[i] = rand() % 256;
-  }
-
-  int index = 0;
-  bytes[index+0] = 0xAA;
-  bytes[index+1] = 0xAA;
-  bytes[index+2] = 0x00;
-  bytes[index+3] = 0x64;
-  bytes[index+4] = 0x00;
-  bytes[index+5] = 0x64;
-
-  gr::blocks::kernel::unpack_k_bits unpacker = 
gr::blocks::kernel::unpack_k_bits(8);
-  unpacker.unpack(bits, bytes, nbytes);
-
-  // Convert bits to +/-1 and add a small bit of noise
-  std::vector<float> sub(nbits, 1.0f);
-  volk_8i_s32f_convert_32f(soft, (const int8_t*)bits, 1.0, nbits);
-  volk_32f_s32f_multiply_32f(soft, soft, 2.0, nbits);
-  volk_32f_x2_subtract_32f(soft, soft, &sub[0], nbits);
-  for(unsigned int i = 0; i < nbits; i++) {
-    soft[i] += 0.1 * ((float)rand() / (float)RAND_MAX - 0.5);
-  }
-
-  std::string ac = "1010101010101010"; //0xAAAA
-  gr::digital::packet_formatter_default::sptr formatter;
-  formatter = gr::digital::packet_formatter_default::make(ac);
-  formatter->set_threshold(0);
-
-  int count = 0;
-  std::vector<pmt::pmt_t> info;
-  bool ret = formatter->parse_soft(nbits, soft, info, count);
-
-  CPPUNIT_ASSERT(ret);
-  CPPUNIT_ASSERT_EQUAL((size_t)1, info.size());
-
-  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);
-}
-
-
-void
 qa_packet_formatters::test_counter_format()
 {
   static const int N = 4800;
@@ -226,7 +157,7 @@ qa_packet_formatters::test_counter_format()
 
   uint16_t expected_bps = 2;
   gr::digital::packet_formatter_counter::sptr formatter;
-  formatter = gr::digital::packet_formatter_counter::make(ac, expected_bps);
+  formatter = gr::digital::packet_formatter_counter::make(ac, 0, expected_bps);
 
   pmt::pmt_t output;
   pmt::pmt_t info = pmt::make_dict();
@@ -310,8 +241,7 @@ qa_packet_formatters::test_counter_parse()
   uint16_t expected_bps = 2;
   std::string ac = "1010101010101010"; //0xAAAA
   gr::digital::packet_formatter_counter::sptr formatter;
-  formatter = gr::digital::packet_formatter_counter::make(ac, expected_bps);
-  formatter->set_threshold(0);
+  formatter = gr::digital::packet_formatter_counter::make(ac, 0, expected_bps);
 
   int count = 0;
   std::vector<pmt::pmt_t> info;
@@ -341,81 +271,3 @@ qa_packet_formatters::test_counter_parse()
   volk_free(bytes);
   volk_free(bits);
 }
-
-void
-qa_packet_formatters::test_counter_parse_soft()
-{
-  static const int nbytes = 110;
-  static const int nbits = 8*nbytes;
-  unsigned char *bytes = (unsigned char*)volk_malloc(nbytes*sizeof(unsigned 
char),
-                                                     volk_get_alignment());
-  unsigned char *bits = (unsigned char*)volk_malloc(nbits*sizeof(unsigned 
char),
-                                                    volk_get_alignment());
-  float *soft = (float*)volk_malloc(nbits*sizeof(float),
-                                    volk_get_alignment());
-
-  srand(time(NULL));
-
-  // Fill bytes with random values
-  for(unsigned int i = 0; i < nbytes; i++) {
-    bytes[i] = rand() % 256;
-  }
-
-  int index = 0;
-  bytes[index+0] = 0xAA;
-  bytes[index+1] = 0xAA;
-  bytes[index+2] = 0x00;
-  bytes[index+3] = 0x64;
-  bytes[index+4] = 0x00;
-  bytes[index+5] = 0x64;
-  bytes[index+6] = 0x00;
-  bytes[index+7] = 0x02;
-  bytes[index+8] = 0x00;
-  bytes[index+9] = 0x00;
-
-  gr::blocks::kernel::unpack_k_bits unpacker = 
gr::blocks::kernel::unpack_k_bits(8);
-  unpacker.unpack(bits, bytes, nbytes);
-
-  // Convert bits to +/-1 and add a small bit of noise
-  std::vector<float> sub(nbits, 1.0f);
-  volk_8i_s32f_convert_32f(soft, (const int8_t*)bits, 1.0, nbits);
-  volk_32f_s32f_multiply_32f(soft, soft, 2.0, nbits);
-  volk_32f_x2_subtract_32f(soft, soft, &sub[0], nbits);
-  for(unsigned int i = 0; i < nbits; i++) {
-    soft[i] += 0.1 * ((float)rand() / (float)RAND_MAX - 0.5);
-  }
-
-  uint16_t expected_bps = 2;
-  std::string ac = "1010101010101010"; //0xAAAA
-  gr::digital::packet_formatter_counter::sptr formatter;
-  formatter = gr::digital::packet_formatter_counter::make(ac, expected_bps);
-  formatter->set_threshold(0);
-
-  int count = 0;
-  std::vector<pmt::pmt_t> info;
-  bool ret = formatter->parse_soft(nbits, soft, info, count);
-
-  CPPUNIT_ASSERT(ret);
-  CPPUNIT_ASSERT_EQUAL((size_t)1, info.size());
-
-  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"),
-                                           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);
-  CPPUNIT_ASSERT_EQUAL(expected_bps, (uint16_t)bps);
-  CPPUNIT_ASSERT_EQUAL(0, counter);
-
-  volk_free(bytes);
-  volk_free(bits);
-}
diff --git a/gr-digital/lib/qa_packet_formatters.h 
b/gr-digital/lib/qa_packet_formatters.h
index 83ed270..cff2d54 100644
--- a/gr-digital/lib/qa_packet_formatters.h
+++ b/gr-digital/lib/qa_packet_formatters.h
@@ -31,10 +31,8 @@ class qa_packet_formatters : public CppUnit::TestCase
   CPPUNIT_TEST_SUITE(qa_packet_formatters);
   CPPUNIT_TEST(test_default_format);
   CPPUNIT_TEST(test_default_parse);
-  CPPUNIT_TEST(test_default_parse_soft);
   CPPUNIT_TEST(test_counter_format);
   CPPUNIT_TEST(test_counter_parse);
-  CPPUNIT_TEST(test_counter_parse_soft);
   CPPUNIT_TEST_SUITE_END();
 
  private:
diff --git a/gr-digital/swig/digital_swig.i b/gr-digital/swig/digital_swig.i
index 0270cfc..6cf14a1 100644
--- a/gr-digital/swig/digital_swig.i
+++ b/gr-digital/swig/digital_swig.i
@@ -100,6 +100,7 @@
 #include "gnuradio/digital/ofdm_sampler.h"
 #include "gnuradio/digital/ofdm_serializer_vcc.h"
 #include "gnuradio/digital/ofdm_sync_sc_cfb.h"
+#include "gnuradio/digital/packet_formatter_base.h"
 #include "gnuradio/digital/packet_formatter_default.h"
 #include "gnuradio/digital/packet_formatter_counter.h"
 #include "gnuradio/digital/packet_format_async.h"
@@ -185,6 +186,7 @@
 %include "gnuradio/digital/ofdm_sampler.h"
 %include "gnuradio/digital/ofdm_serializer_vcc.h"
 %include "gnuradio/digital/ofdm_sync_sc_cfb.h"
+%include "gnuradio/digital/packet_formatter_base.h"
 %include "gnuradio/digital/packet_formatter_default.h"
 %include "gnuradio/digital/packet_formatter_counter.h"
 %include "gnuradio/digital/packet_format_async.h"
diff --git a/gr-digital/swig/packet_header.i b/gr-digital/swig/packet_header.i
index 86ee8d9..64b29d4 100644
--- a/gr-digital/swig/packet_header.i
+++ b/gr-digital/swig/packet_header.i
@@ -32,6 +32,8 @@ packet_header_ofdm_sptr.__repr__ = lambda self: 
"<packet_header_ofdm>"
 packet_header_ofdm = packet_header_ofdm .make;
 %}
 
+%template(packet_formatter_base_sptr) 
boost::shared_ptr<gr::digital::packet_formatter_base>;
+
 %template(packet_formatter_default_sptr) 
boost::shared_ptr<gr::digital::packet_formatter_default>;
 %pythoncode %{
 packet_formatter_default_sptr.__repr__ = lambda self: 
"<packet_formatter_default>"



reply via email to

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