summaryrefslogtreecommitdiff
path: root/gr-digital/include/digital
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@kit.edu>2013-03-29 19:06:48 +0100
committerMartin Braun <martin.braun@kit.edu>2013-03-29 19:06:48 +0100
commita67bfcc5fcbea9064a05cfdd4bea7b6fab2c531f (patch)
treea7f4ef4ae3e2eccbc6b400a0329d52594aeecb44 /gr-digital/include/digital
parentb7a5f16fcd559b8246a9155c6602a6b539be039e (diff)
digital: made the tagging description for packet header gen more explicit
Diffstat (limited to 'gr-digital/include/digital')
-rw-r--r--gr-digital/include/digital/packet_headergenerator_bb.h27
-rw-r--r--gr-digital/include/digital/packet_headerparser_b.h6
2 files changed, 26 insertions, 7 deletions
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.