diff options
Diffstat (limited to 'gr-digital/include/digital')
-rw-r--r-- | gr-digital/include/digital/CMakeLists.txt | 40 | ||||
-rw-r--r-- | gr-digital/include/digital/api.h | 33 | ||||
-rw-r--r-- | gr-digital/include/digital/header_payload_demux.h | 91 | ||||
-rw-r--r-- | gr-digital/include/digital/ofdm_frame_equalizer_vcvc.h | 78 | ||||
-rw-r--r-- | gr-digital/include/digital/ofdm_serializer_vcc.h | 98 | ||||
-rw-r--r-- | gr-digital/include/digital/packet_header_default.h | 113 | ||||
-rw-r--r-- | gr-digital/include/digital/packet_header_ofdm.h | 104 | ||||
-rw-r--r-- | gr-digital/include/digital/packet_headergenerator_bb.h | 73 | ||||
-rw-r--r-- | gr-digital/include/digital/packet_headerparser_b.h | 71 |
9 files changed, 0 insertions, 701 deletions
diff --git a/gr-digital/include/digital/CMakeLists.txt b/gr-digital/include/digital/CMakeLists.txt deleted file mode 100644 index 9c62f54967..0000000000 --- a/gr-digital/include/digital/CMakeLists.txt +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright 2012 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. - -######################################################################## -# generate helper scripts to expand templated files -######################################################################## -include(GrPython) - -######################################################################## -# Install header files -######################################################################## -install(FILES - api.h - ofdm_chanest_vcvc.h - ofdm_frame_equalizer_vcvc.h - ofdm_serializer_vcc.h - packet_header_default.h - packet_header_ofdm.h - packet_headergenerator_bb.h - packet_headerparser_b.h - header_payload_demux.h DESTINATION ${GR_INCLUDE_DIR}/gnuradio/digital - COMPONENT "digital_devel" -) - diff --git a/gr-digital/include/digital/api.h b/gr-digital/include/digital/api.h deleted file mode 100644 index 0912f7e0d4..0000000000 --- a/gr-digital/include/digital/api.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2012 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. - */ - -#ifndef INCLUDED_DIGITAL_API_H -#define INCLUDED_DIGITAL_API_H - -#include <gruel/attributes.h> - -#ifdef gnuradio_digital_EXPORTS -# define DIGITAL_API __GR_ATTR_EXPORT -#else -# define DIGITAL_API __GR_ATTR_IMPORT -#endif - -#endif /* INCLUDED_DIGITAL_API_H */ diff --git a/gr-digital/include/digital/header_payload_demux.h b/gr-digital/include/digital/header_payload_demux.h deleted file mode 100644 index 1427062d77..0000000000 --- a/gr-digital/include/digital/header_payload_demux.h +++ /dev/null @@ -1,91 +0,0 @@ -/* -*- c++ -*- */ -/* Copyright 2012 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. - */ - -#ifndef INCLUDED_DIGITAL_HEADER_PAYLOAD_DEMUX_H -#define INCLUDED_DIGITAL_HEADER_PAYLOAD_DEMUX_H - -#include <digital/api.h> -#include <gr_block.h> - -namespace gr { - namespace digital { - - /*! - * \brief Header/Payload demuxer. - * \ingroup packet_operators_blk - * - * \details - * This block is designed to handle packets from a bursty transmission. - * Input 0 takes a continuous transmission of samples. - * If used, input 1 is a trigger signal. In this case, a 1 on input 1 - * is a trigger. Otherwise, a tag with the key specified in \p trigger_tag_key - * is used as a trigger (its value is irrelevant). - * - * Until a trigger signal is detected, all samples are dropped onto the floor. - * Once a trigger is detected, a total of \p header_len items are copied to output 0. - * The block then stalls until it receives a message on the message port - * \p header_data. The message must be a PMT dictionary; all key/value pairs are - * copied as tags to the first item of the payload (which is assumed to be the - * first item after the header). - * The value corresponding to the key specified in \p length_tag_key is read - * and taken as the payload length. The payload, together with the header data - * as tags, is then copied to output 1. - * - * If specified, \p guard_interval items are discarded before every symbol. - * This is useful for demuxing bursts of OFDM signals. - * - * Any tags on the input stream are copied to the corresponding output *if* they're - * on an item that is propagated. Note that a tag on the header items is copied to the - * header stream; that means the header-parsing block must handle these tags if they - * should go on the payload. - * A special case are tags on items that make up the guard interval. These are copied - * to the first item of the following symbol. - */ - class DIGITAL_API header_payload_demux : virtual public gr_block - { - public: - typedef boost::shared_ptr<header_payload_demux> sptr; - - /*! - * \param header_len Number of symbols per header - * \param items_per_symbol Number of items per symbol - * \param guard_interval Number of items between two consecutive symbols - * \param length_tag_key Key of the frame length tag - * \param trigger_tag_key Key of the trigger tag - * \param output_symbols Output symbols (true) or items (false)? - * \param itemsize Item size (bytes per item) - */ - static sptr make( - int header_len, - int items_per_symbol, - int guard_interval=0, - const std::string &length_tag_key="frame_len", - const std::string &trigger_tag_key="", - bool output_symbols=false, - size_t itemsize=sizeof(gr_complex) - ); - }; - - } // namespace digital -} // namespace gr - -#endif /* INCLUDED_DIGITAL_HEADER_PAYLOAD_DEMUX_H */ - diff --git a/gr-digital/include/digital/ofdm_frame_equalizer_vcvc.h b/gr-digital/include/digital/ofdm_frame_equalizer_vcvc.h deleted file mode 100644 index cd1b943f47..0000000000 --- a/gr-digital/include/digital/ofdm_frame_equalizer_vcvc.h +++ /dev/null @@ -1,78 +0,0 @@ -/* -*- c++ -*- */ -/* Copyright 2012 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. - */ - - -#ifndef INCLUDED_OFDM_FRAME_EQUALIZER_VCVC_H -#define INCLUDED_OFDM_FRAME_EQUALIZER_VCVC_H - -#include <digital_ofdm_equalizer_base.h> -#include <digital/api.h> -#include <gr_tagged_stream_block.h> - -namespace gr { - namespace digital { - - /*! - * \brief OFDM frame equalizer - * \ingroup ofdm_blk - * - * This does two things: - * First, it removes the coarse carrier offset. If a tag is found on the first - * item with the key 'ofdm_sync_carr_offset', this is interpreted as the coarse - * frequency offset in number of carriers. - * Next, it performs equalization in one or two dimensions on a tagged OFDM frame. - * The actual equalization is done by a ofdm_frame_equalizer object, outside of - * the block. - * - * Note that the tag with the coarse carrier offset is not removed. Blocks - * downstream from this block must not attempt to also correct this offset. - * - * Input: a tagged series of OFDM symbols. - * Output: The same as the input, but equalized and frequency-corrected. - */ - class DIGITAL_API ofdm_frame_equalizer_vcvc : virtual public gr_tagged_stream_block - { - public: - typedef boost::shared_ptr<ofdm_frame_equalizer_vcvc> sptr; - - /*! - * \param equalizer The equalizer object that will do the actual work - * \param cp_len Length of the cyclic prefix in samples (required to correct the frequency offset) - * \param len_tag_key Length tag key - * \param propagate_channel_state If true, the channel state after the last symbol - * will be added to the first symbol as a tag - * \param fixed_frame_len Set if the frame length is fixed throughout, - * helps with book keeping. - */ - static sptr make( - digital_ofdm_equalizer_base_sptr equalizer, - int cp_len, - const std::string &len_tag_key="frame_len", - bool propagate_channel_state=false, - int fixed_frame_len=0 - ); - }; - - } // namespace digital -} // namespace gr - -#endif /* INCLUDED_OFDM_FRAME_EQUALIZER_VCVC_H */ - diff --git a/gr-digital/include/digital/ofdm_serializer_vcc.h b/gr-digital/include/digital/ofdm_serializer_vcc.h deleted file mode 100644 index fde2458b6b..0000000000 --- a/gr-digital/include/digital/ofdm_serializer_vcc.h +++ /dev/null @@ -1,98 +0,0 @@ -/* -*- c++ -*- */ -/* Copyright 2012 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. - */ - -#ifndef INCLUDED_DIGITAL_OFDM_SERIALIZER_VCC_H -#define INCLUDED_DIGITAL_OFDM_SERIALIZER_VCC_H - -#include <digital/api.h> -#include <gr_tagged_stream_block.h> -#include <digital_ofdm_carrier_allocator_cvc.h> - -namespace gr { - namespace digital { - - /*! - * \brief Serializes complex modulations symbols from OFDM sub-carriers - * \ingroup ofdm_blk - * - * This is the inverse block to the carrier_allocator_cvc. It outputs the - * complex data symbols as a tagged stream, discarding the pilot symbols. - * - * If given, two different tags are parsed: The first key (\p len_tag_key) - * specifies the number of OFDM symbols in the frame at the input. The - * second key (\p packet_len_tag_key) specifies the number of complex symbols - * that are coded into this frame. If given, this second key is then used - * at the output, otherwise, \p len_tag_key is used. - * If both are given, the packet length specifies the maximum number of - * output items, and the frame length specifies the exact number of - * consumed input items. - * - * It is possible to correct a carrier offset in this function by passing - * another tag with said offset. - * - * Input: Complex vectors of length \p fft_len - * Output: Complex scalars, in the same order as specified in occupied_carriers. - */ - class DIGITAL_API ofdm_serializer_vcc : virtual public gr_tagged_stream_block - { - public: - typedef boost::shared_ptr<ofdm_serializer_vcc> sptr; - - /*! - * \param fft_len FFT length - * \param occupied_carriers See ofdm_carrier_allocator_cvc. - * \param len_tag_key The key of the tag identifying the length of the input frame in OFDM symbols. - * \param packet_len_tag_key The key of the tag identifying the number of complex symbols in this packet. - * \param symbols_skipped If the first symbol is not allocated as in \p occupied_carriers[0], set this - * \param carr_offset_key When this block should correct a carrier offset, specify the tag key of the offset here (not necessary if following an ofdm_frame_equalizer_vcvc) - * \param input_is_shifted If the input has the DC carrier on index 0 (i.e. it is not FFT shifted), set this to false - */ - static sptr make( - int fft_len, - const std::vector<std::vector<int> > &occupied_carriers, - const std::string &len_tag_key="frame_len", - const std::string &packet_len_tag_key="", - int symbols_skipped=0, - const std::string &carr_offset_key="", - bool input_is_shifted=true - ); - - /*! - * \param allocator The carrier allocator block of which this shall be the inverse - * \param packet_len_tag_key The key of the tag identifying the number of complex symbols in this packet. - * \param symbols_skipped If the first symbol is not allocated as in \p occupied_carriers[0], set this - * \param carr_offset_key When this block should correct a carrier offset, specify the tag key of the offset here (not necessary if following an ofdm_frame_equalizer_vcvc) - * \param input_is_shifted If the input has the DC carrier on index 0 (i.e. it is not FFT shifted), set this to false - */ - static sptr make( - const digital_ofdm_carrier_allocator_cvc_sptr &allocator, - const std::string &packet_len_tag_key="", - int symbols_skipped=0, - const std::string &carr_offset_key="", - bool input_is_shifted=true - ); - }; - - } // namespace digital -} // namespace gr - -#endif /* INCLUDED_DIGITAL_OFDM_SERIALIZER_VCC_H */ - diff --git a/gr-digital/include/digital/packet_header_default.h b/gr-digital/include/digital/packet_header_default.h deleted file mode 100644 index e4c994593f..0000000000 --- a/gr-digital/include/digital/packet_header_default.h +++ /dev/null @@ -1,113 +0,0 @@ -/* -*- c++ -*- */ -/* Copyright 2012 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. - */ - -#ifndef INCLUDED_DIGITAL_PACKET_HEADER_DEFAULT_H -#define INCLUDED_DIGITAL_PACKET_HEADER_DEFAULT_H - -#include <gr_tags.h> -#include <digital/api.h> -#include <boost/enable_shared_from_this.hpp> - -namespace gr { - namespace digital { - - /*! - * \brief Default header formatter for digital packet transmission. - * \ingroup packet_operators_blk - * - * \details - * 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> - { - public: - typedef boost::shared_ptr<packet_header_default> sptr; - - packet_header_default( - long header_len, - const std::string &len_tag_key="packet_len", - const std::string &num_tag_key="packet_num", - int bits_per_byte=1); - ~packet_header_default(); - - sptr base() { return shared_from_this(); }; - sptr formatter() { return shared_from_this(); }; - - void set_header_num(unsigned header_num) { d_header_number = header_num; }; - 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 - * - * Uses the following header format: - * Bits 0-11: The packet length (what was stored in the tag with key \p len_tag_key) - * Bits 12-27: The header number (counts up everytime this function is called) - * Bit 28: Even parity bit - * All other bits: Are set to zero - * - * If the header length is smaller than 29, bits are simply left out. For this - * reason, they always start with the LSB. - */ - virtual bool header_formatter( - long packet_len, - unsigned char *out, - const std::vector<gr_tag_t> &tags=std::vector<gr_tag_t>() - ); - - /*! - * \brief Inverse function to header_formatter(). - * - * Reads the bit stream in \p header and writes a corresponding tag into \p tags. - */ - virtual bool header_parser( - const unsigned char *header, - std::vector<gr_tag_t> &tags); - - static sptr make( - long header_len, - const std::string &len_tag_key="packet_len", - const std::string &num_tag_key="packet_num", - int bits_per_byte=1); - - protected: - long d_header_len; - pmt::pmt_t d_len_tag_key; - pmt::pmt_t d_num_tag_key; - int d_bits_per_byte; - unsigned d_header_number; - unsigned d_mask; - }; - - } // namespace digital -} // namespace gr - -#endif /* INCLUDED_DIGITAL_PACKET_HEADER_DEFAULT_H */ - diff --git a/gr-digital/include/digital/packet_header_ofdm.h b/gr-digital/include/digital/packet_header_ofdm.h deleted file mode 100644 index ea55a4510a..0000000000 --- a/gr-digital/include/digital/packet_header_ofdm.h +++ /dev/null @@ -1,104 +0,0 @@ -/* -*- c++ -*- */ -/* Copyright 2012 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. - */ - -#ifndef INCLUDED_DIGITAL_PACKET_HEADER_OFDM_H -#define INCLUDED_DIGITAL_PACKET_HEADER_OFDM_H - -#include <vector> -#include <digital/api.h> -#include <digital/packet_header_default.h> - -namespace gr { - namespace digital { - - /*! - * \brief Header utility for OFDM signals. - * \ingroup ofdm_blk - * - */ - class DIGITAL_API packet_header_ofdm : public packet_header_default - { - public: - typedef boost::shared_ptr<packet_header_ofdm> sptr; - - packet_header_ofdm( - const std::vector<std::vector<int> > &occupied_carriers, - int n_syms, - const std::string &len_tag_key, - const std::string &frame_len_tag_key, - const std::string &num_tag_key, - int bits_per_header_sym, - int bits_per_payload_sym); - ~packet_header_ofdm(); - - /*! - * \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 - * packet. - * Note that there is usually no linear connection between the number - * of OFDM symbols and the packet length, because, a packet might - * finish mid-OFDM-symbol. - */ - bool header_parser( - const unsigned char *header, - std::vector<gr_tag_t> &tags); - - /*! - * \param occupied_carriers See carrier allocator - * \param n_syms The number of OFDM symbols the header should be (usually 1) - * \param len_tag_key The tag key used for the packet length (number of bytes) - * \param frame_len_tag_key The tag key used for the frame length (number of - * OFDM symbols, this is the tag key required for the - * frame equalizer etc.) - * \param num_tag_key The tag key used for packet numbering. - * \param bits_per_header_sym Bits per complex symbol in the header, e.g. 1 if - * the header is BPSK modulated, 2 if it's QPSK - * modulated etc. - * \param bits_per_payload_sym Bits per complex symbol in the payload. This is - * required to figure out how many OFDM symbols - * are necessary to encode the given number of - * bytes. - */ - static sptr make( - const std::vector<std::vector<int> > &occupied_carriers, - int n_syms, - const std::string &len_tag_key="packet_len", - const std::string &frame_len_tag_key="frame_len", - const std::string &num_tag_key="packet_num", - int bits_per_header_sym=1, - int bits_per_payload_sym=1 - ); - - - 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 - int d_bits_per_payload_sym; - }; - - } // namespace digital -} // namespace gr - -#endif /* INCLUDED_DIGITAL_PACKET_HEADER_OFDM_H */ - diff --git a/gr-digital/include/digital/packet_headergenerator_bb.h b/gr-digital/include/digital/packet_headergenerator_bb.h deleted file mode 100644 index 426f49dee5..0000000000 --- a/gr-digital/include/digital/packet_headergenerator_bb.h +++ /dev/null @@ -1,73 +0,0 @@ -/* -*- c++ -*- */ -/* Copyright 2012 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. - */ - -#ifndef INCLUDED_PACKET_HEADERGENERATOR_BB_H -#define INCLUDED_PACKET_HEADERGENERATOR_BB_H - -#include <digital/api.h> -#include <gr_tagged_stream_block.h> -#include <digital/packet_header_default.h> - -namespace gr { - namespace digital { - - /*! - * \brief Generates a header for a tagged, streamed packet. - * \ingroup packet_operators_blk - * - * \details - * 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; - - /* \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"); - }; - - } // namespace digital -} // namespace gr - -#endif /* INCLUDED_PACKET_HEADERGENERATOR_BB_H */ - diff --git a/gr-digital/include/digital/packet_headerparser_b.h b/gr-digital/include/digital/packet_headerparser_b.h deleted file mode 100644 index cdf76f1209..0000000000 --- a/gr-digital/include/digital/packet_headerparser_b.h +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- c++ -*- */ -/* Copyright 2012 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. - */ - -#ifndef INCLUDED_DIGITAL_PACKET_HEADERPARSER_B_H -#define INCLUDED_DIGITAL_PACKET_HEADERPARSER_B_H - -#include <digital/api.h> -#include <gr_sync_block.h> -#include <digital/packet_header_default.h> - -namespace gr { - namespace digital { - - /*! - * \brief Post header metadata as a PMT - * \ingroup packet_operators_blk - * - * \details - * 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 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. - */ - class DIGITAL_API packet_headerparser_b : virtual public gr_sync_block - { - public: - typedef boost::shared_ptr<packet_headerparser_b> sptr; - - /*! - * \param header_formatter Header object. This should be the same as used for - * packet_headergenerator_bb. - */ - static sptr make(const gr::digital::packet_header_default::sptr &header_formatter); - - /*! - * \param header_len Number of bytes per header - * \param len_tag_key Length Tag Key - */ - static sptr make(long header_len, const std::string &len_tag_key); - }; - - } // namespace digital -} // namespace gr - -#endif /* INCLUDED_DIGITAL_PACKET_HEADERPARSER_B_H */ - |