From a67bfcc5fcbea9064a05cfdd4bea7b6fab2c531f Mon Sep 17 00:00:00 2001
From: Martin Braun <martin.braun@kit.edu>
Date: Fri, 29 Mar 2013 19:06:48 +0100
Subject: digital: made the tagging description for packet header gen more
 explicit

---
 .../include/digital/packet_headergenerator_bb.h    | 27 +++++++++++++++++-----
 gr-digital/include/digital/packet_headerparser_b.h |  6 ++++-
 2 files changed, 26 insertions(+), 7 deletions(-)

(limited to 'gr-digital/include/digital')

diff --git a/gr-digital/include/digital/packet_headergenerator_bb.h b/gr-digital/include/digital/packet_headergenerator_bb.h
index 8d92bf84ed..cec860fd55 100644
--- a/gr-digital/include/digital/packet_headergenerator_bb.h
+++ b/gr-digital/include/digital/packet_headergenerator_bb.h
@@ -33,18 +33,33 @@ namespace gr {
      * \brief Generates a header for a tagged, streamed packet.
      * \ingroup digital
      *
-     * Input: A tagged stream. The first element must have a tag with the key
-     *        specified in len_tag_key, which hold the exact number of elements
-     *        in the PDU.
-     * Output: An tagged stream of length header_len. The output is determined
-     *         by a header formatter.
+     * Input: A tagged stream. This is consumed entirely, it is not appended
+     *        to the output stream.
+     * Output: An tagged stream containing the header. The details on the header
+     *         are set in a header formatter object (of type packet_header_default
+     *         or a subclass thereof). If only a number of bits is specified, a
+     *         default header is generated (see packet_header_default).
      */
     class DIGITAL_API packet_headergenerator_bb : virtual public gr_tagged_stream_block
     {
      public:
       typedef boost::shared_ptr<packet_headergenerator_bb> sptr;
 
-      static sptr make(const packet_header_default::sptr &header_formatter);
+      /* \param header_formatter A header formatter object.
+       * \param len_tag_key Length tag key. Note that for header generation,
+       *                    it is irrelevant which tag names are set in the
+       *                    formatter object, only this value is relevant!
+       */
+      static sptr make(
+	  const packet_header_default::sptr &header_formatter,
+	  const std::string &len_tag_key="packet_len"
+      );
+
+      /* \param header_len If this value is given, a packet_header_default
+       *                   object is used to generate the header. This is
+       *                   the number of bits per header.
+       * \param len_tag_key Length tag key.
+       */
       static sptr make(
 	   long header_len,
 	   const std::string &len_tag_key = "packet_len");
diff --git a/gr-digital/include/digital/packet_headerparser_b.h b/gr-digital/include/digital/packet_headerparser_b.h
index a3db069cbd..2dc6a80717 100644
--- a/gr-digital/include/digital/packet_headerparser_b.h
+++ b/gr-digital/include/digital/packet_headerparser_b.h
@@ -35,7 +35,11 @@ namespace gr {
      *
      * In a sense, this is the inverse block to packet_headergenerator_bb.
      * The difference is, the parsed header is not output as a stream,
-     * but as a message.
+     * but as a PMT dictionary, which is published to message port with
+     * the id "header_data".
+     * The dictionary consists of the tags created by the header formatter
+     * object. You should be able to use the exact same formatter object
+     * as used on the Tx side in the packet_headergenerator_bb.
      *
      * If only a header length is given, this block uses the default header
      * format.
-- 
cgit v1.2.3