diff options
author | Tom Rondeau <trondeau@vt.edu> | 2013-04-01 12:42:34 -0400 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2013-04-01 12:42:34 -0400 |
commit | 2a525ac04bcb0a70d193bddf9ba1018a99484904 (patch) | |
tree | d55538ecb7fb9a0e006df239ccbd93b8bab3ed20 /gr-digital/include/digital | |
parent | fbd74560b72196fba9de8c6d01378b0715df758a (diff) | |
parent | 888c07f2510c49b5100223121ee02d9faea287d9 (diff) |
Merge branch 'master' into next
Conflicts:
gnuradio-runtime/include/gr_logger.h
gr-digital/lib/packet_headergenerator_bb_impl.cc
gr-digital/python/ofdm_txrx.py
gr-digital/python/qa_ofdm_txrx.py
gr-digital/python/qa_packet_headergenerator_bb.py
gr-uhd/examples/python/usrp_spectrum_sense.py
Diffstat (limited to 'gr-digital/include/digital')
5 files changed, 46 insertions, 14 deletions
diff --git a/gr-digital/include/digital/ofdm_frame_equalizer_vcvc.h b/gr-digital/include/digital/ofdm_frame_equalizer_vcvc.h index 68e8b7ad9f..de74d325ad 100644 --- a/gr-digital/include/digital/ofdm_frame_equalizer_vcvc.h +++ b/gr-digital/include/digital/ofdm_frame_equalizer_vcvc.h @@ -42,7 +42,7 @@ namespace gr { public: typedef boost::shared_ptr<ofdm_frame_equalizer_vcvc> sptr; - /* + /*! * \param equalizer The equalizer object that will do the actual work * \param len_tag_key Length tag key * \param propagate_channel_state If true, the channel state after the last symbol diff --git a/gr-digital/include/digital/packet_header_default.h b/gr-digital/include/digital/packet_header_default.h index a4158e728c..d69a0f30a6 100644 --- a/gr-digital/include/digital/packet_header_default.h +++ b/gr-digital/include/digital/packet_header_default.h @@ -30,9 +30,19 @@ namespace gr { namespace digital { /*! - * \brief <+description of block+> + * \brief Default header formatter for digital packet transmission. * \ingroup digital * + * For bursty/packetized digital transmission, packets are usually prepended + * with a packet header, containing the number of bytes etc. + * This class is not a block, but a tool to create these packet header. + * + * This is a default packet header (see header_formatter()) for a description + * on the header format). To create other header, derive packet header creator + * classes from this function. + * + * gr::digital::packet_headergenerator_bb uses header generators derived from + * this class to create packet headers from data streams. */ class DIGITAL_API packet_header_default : public boost::enable_shared_from_this<gr::digital::packet_header_default> { @@ -53,7 +63,8 @@ namespace gr { long header_len() { return d_header_len; }; pmt::pmt_t len_tag_key() { return d_len_tag_key; }; - /* \brief Encodes the header information in the given tags into bits and places them into \p out + /*! + * \brief Encodes the header information in the given tags into bits and places them into \p out * * Uses the following header format: * Bits 0-11: The packet length (what was stored in the tag with key \p len_tag_key) @@ -70,7 +81,8 @@ namespace gr { const std::vector<gr_tag_t> &tags=std::vector<gr_tag_t>() ); - /* \brief Inverse function to header_formatter(). + /*! + * \brief Inverse function to header_formatter(). * * Reads the bit stream in \in and writes a corresponding tag into \p tags. * diff --git a/gr-digital/include/digital/packet_header_ofdm.h b/gr-digital/include/digital/packet_header_ofdm.h index 6c3453ed1d..9f70900b49 100644 --- a/gr-digital/include/digital/packet_header_ofdm.h +++ b/gr-digital/include/digital/packet_header_ofdm.h @@ -48,7 +48,8 @@ namespace gr { int bits_per_sym=1); ~packet_header_ofdm(); - /* \brief Inverse function to header_formatter(). + /*! + * \brief Inverse function to header_formatter(). * * Does the same as packet_header_default::header_parser(), but * adds another tag that stores the number of OFDM symbols in the @@ -72,8 +73,8 @@ namespace gr { protected: pmt::pmt_t d_frame_len_tag_key; - const std::vector<std::vector<int> > d_occupied_carriers; //! Which carriers/symbols carry data - int d_syms_per_set; //! Helper variable: Total number of elements in d_occupied_carriers + const std::vector<std::vector<int> > d_occupied_carriers; //!< Which carriers/symbols carry data + int d_syms_per_set; //!< Helper variable: Total number of elements in d_occupied_carriers }; } // namespace 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. |