GNU Radio's CDMA Package
packet_headerparser_b2.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/* Copyright 2012 Free Software Foundation, Inc.
3 *
4 * This file is part of GNU Radio
5 *
6 * GNU Radio is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3, or (at your option)
9 * any later version.
10 *
11 * GNU Radio is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with GNU Radio; see the file COPYING. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street,
19 * Boston, MA 02110-1301, USA.
20 */
21
22#ifndef INCLUDED_CDMA_PACKET_HEADERPARSER_B2_H
23#define INCLUDED_CDMA_PACKET_HEADERPARSER_B2_H
24
25#include <cdma/api.h>
26#include <gnuradio/sync_block.h>
27#include <cdma/packet_header2.h>
28
29namespace gr {
30 namespace cdma {
31
32 /*!
33 * \brief Post header metadata as a PMT
34 * \ingroup packet_operators_blk
35 *
36 * \details
37 * In a sense, this is the inverse block to packet_headergenerator_bb.
38 * The difference is, the parsed header is not output as a stream,
39 * but as a PMT dictionary, which is published to message port with
40 * the id "header_data".
41 *
42 * The dictionary consists of the tags created by the header formatter
43 * object. You should be able to use the exact same formatter object
44 * as used on the Tx side in the packet_headergenerator_bb.
45 *
46 * If only a header length is given, this block uses the default header
47 * format.
48 */
49 class CDMA_API packet_headerparser_b2 : virtual public sync_block
50 {
51 public:
52 typedef boost::shared_ptr<packet_headerparser_b2> sptr;
53
54 /*!
55 * \param header_formatter Header object. This should be the same as used for
56 * packet_headergenerator_bb.
57 */
58 static sptr make(const gr::cdma::packet_header2::sptr &header_formatter);
59
60 /*!
61 * \param header_len Number of bytes per header
62 * \param len_tag_key Length Tag Key
63 */
64 static sptr make(long header_len, const std::string &len_tag_key);
65 };
66
67 } // namespace cdma
68} // namespace gr
69
70#endif /* INCLUDED_CDMA_PACKET_HEADERPARSER_B1_H */
71
#define CDMA_API
Definition api.h:30
boost::shared_ptr< packet_header2 > sptr
Definition packet_header2.h:54
Definition amp_var_est.h:30