GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
framer_sink_1.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2005,2006,2012 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 #ifndef INCLUDED_GR_FRAMER_SINK_1_H
12 #define INCLUDED_GR_FRAMER_SINK_1_H
13 
14 #include <gnuradio/digital/api.h>
15 #include <gnuradio/msg_queue.h>
16 #include <gnuradio/sync_block.h>
17 
18 namespace gr {
19 namespace digital {
20 
21 /*!
22  * \brief Given a stream of bits and access_code flags, assemble packets.
23  * \ingroup packet_operators_blk
24  *
25  * \details
26  * input: stream of bytes from digital_correlate_access_code_bb
27  * output: none. Pushes assembled packet into target queue
28  *
29  * The framer expects a fixed length header of 2 16-bit shorts
30  * containing the payload length, followed by the payload. If the
31  * 2 16-bit shorts are not identical, this packet is
32  * ignored. Better algs are welcome.
33  *
34  * The input data consists of bytes that have two bits used. Bit
35  * 0, the LSB, contains the data bit. Bit 1 if set, indicates that
36  * the corresponding bit is the the first bit of the packet. That
37  * is, this bit is the first one after the access code.
38  */
39 class DIGITAL_API framer_sink_1 : virtual public sync_block
40 {
41 public:
42  // gr::digital::framer_sink_1::sptr
43  typedef std::shared_ptr<framer_sink_1> sptr;
44 
45  /*!
46  * Make a framer_sink_1 block.
47  *
48  * \param target_queue The message queue where frames go.
49  */
50  static sptr make(msg_queue::sptr target_queue);
51 };
52 
53 } /* namespace digital */
54 } /* namespace gr */
55 
56 #endif /* INCLUDED_GR_FRAMER_SINK_1_H */
Given a stream of bits and access_code flags, assemble packets.
Definition: framer_sink_1.h:40
static sptr make(msg_queue::sptr target_queue)
std::shared_ptr< framer_sink_1 > sptr
Definition: framer_sink_1.h:43
std::shared_ptr< msg_queue > sptr
Definition: msg_queue.h:35
synchronous 1:1 input to output with history
Definition: sync_block.h:26
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29