GNU Radio Manual and C++ API Reference  3.7.4.1
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
correlate_access_code_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_BB_H
24 #define INCLUDED_DIGITAL_CORRELATE_ACCESS_CODE_BB_H
25 
26 #include <gnuradio/digital/api.h>
27 #include <gnuradio/sync_block.h>
28 #include <string>
29 
30 namespace gr {
31  namespace digital {
32 
33  /*!
34  * \brief Examine input for specified access code, one bit at a time.
35  * \ingroup packet_operators_blk
36  * \ingroup deprecated_blk
37  *
38  * \details
39  * input: stream of bits, 1 bit per input byte (data in LSB)
40  * output: stream of bits, 2 bits per output byte (data in LSB, flag in next higher bit)
41  *
42  * Each output byte contains two valid bits, the data bit, and the
43  * flag bit. The LSB (bit 0) is the data bit, and is the original
44  * input data, delayed 64 bits. Bit 1 is the flag bit and is 1 if
45  * the corresponding data bit is the first data bit following the
46  * access code. Otherwise the flag bit is 0.
47  */
49  {
50  public:
51  // gr::digital::correlate_access_code_bb::sptr
53 
54  /*!
55  * Make a correlate_access_code block.
56  *
57  * \param access_code is represented with 1 byte per bit,
58  * e.g., "010101010111000100"
59  * \param threshold maximum number of bits that may be wrong
60  */
61  static sptr make(const std::string &access_code, int threshold);
62 
63  /*!
64  * Set a new access code.
65  *
66  * \param access_code is represented with 1 byte per bit,
67  * e.g., "010101010111000100"
68  */
69  virtual bool set_access_code(const std::string &access_code) = 0;
70  };
71 
72  } /* namespace digital */
73 } /* namespace gr */
74 
75 #endif /* INCLUDED_DIGITAL_CORRELATE_ACCESS_CODE_BB_H */
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:30
Examine input for specified access code, one bit at a time.
Definition: correlate_access_code_bb.h:48
shared_ptr documentation stub
Definition: shared_ptr_docstub.h:15
boost::shared_ptr< correlate_access_code_bb > sptr
Definition: correlate_access_code_bb.h:52
synchronous 1:1 input to output with historyOverride work to provide the signal processing implementa...
Definition: sync_block.h:37