GNU Radio Manual and C++ API Reference 3.7.14.0
The Free & Open Software Radio Ecosystem
correlate_access_code_tag_bb.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2005,2006,2011,2012 Free Software Foundation, Inc.
4 *
5 * This file is part of GNU Radio
6 *
7 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3, or (at your option)
10 * any later version.
11 *
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Radio; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street,
20 * Boston, MA 02110-1301, USA.
21 */
22
23#ifndef INCLUDED_DIGITAL_CORRELATE_ACCESS_CODE_TAG_BB_H
24#define INCLUDED_DIGITAL_CORRELATE_ACCESS_CODE_TAG_BB_H
25
27#include <gnuradio/sync_block.h>
28#include <string>
29
30namespace gr {
31namespace digital {
32
33/*!
34 * \brief Examine input for specified access code, one bit at a time.
35 * \ingroup packet_operators_blk
36 *
37 * \details
38 * input: stream of bits, 1 bit per input byte (data in LSB)
39 * output: unaltered stream of bits (plus tags)
40 *
41 * This block annotates the input stream with tags. The tags have
42 * key name [tag_name], specified in the constructor. Used for
43 * searching an input data stream for preambles, etc.
44 */
46{
47public:
48 // gr::digital::correlate_access_code_tag_bb::sptr
49 typedef boost::shared_ptr<correlate_access_code_tag_bb> sptr;
50
51 /*!
52 * \param access_code is represented with 1 byte per bit,
53 * e.g., "010101010111000100"
54 * \param threshold maximum number of bits that may be wrong
55 * \param tag_name key of the tag inserted into the tag stream
56 */
57 static sptr
58 make(const std::string& access_code, int threshold, const std::string& tag_name);
59
60 /*!
61 * \param access_code is represented with 1 byte per bit,
62 * e.g., "010101010111000100"
63 */
64 virtual bool set_access_code(const std::string& access_code) = 0;
65 virtual void set_threshold(int threshold) = 0;
66 virtual void set_tagname(const std::string& tagname) = 0;
67};
68
69} /* namespace digital */
70} /* namespace gr */
71
72#endif /* INCLUDED_DIGITAL_CORRELATE_ACCESS_CODE_TAG_BB_H */
Examine input for specified access code, one bit at a time.
Definition: correlate_access_code_tag_bb.h:46
boost::shared_ptr< correlate_access_code_tag_bb > sptr
Definition: correlate_access_code_tag_bb.h:49
virtual void set_tagname(const std::string &tagname)=0
virtual bool set_access_code(const std::string &access_code)=0
virtual void set_threshold(int threshold)=0
static sptr make(const std::string &access_code, int threshold, const std::string &tag_name)
synchronous 1:1 input to output with history
Definition: sync_block.h:38
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:30
Include this header to use the message passing features.
Definition: basic_block.h:45