GNU Radio's FRAMERS Package
gr_hdlc_framer_2_channel_b_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2014 <+YOU OR YOUR COMPANY+>.
4  *
5  * This is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3, or (at your option)
8  * any later version.
9  *
10  * This software is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this software; see the file COPYING. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef INCLUDED_FRAMERS_GR_HDLC_FRAMER_2_CHANNEL_B_IMPL_H
22 #define INCLUDED_FRAMERS_GR_HDLC_FRAMER_2_CHANNEL_B_IMPL_H
23 
24 #include <queue>
25 
27 #include <hdlc_framer.h>
28 
29 using std::queue;
30 namespace gr {
31  namespace framers {
32 
34  {
35  private:
36  // This does most of the framing work
37  hdlc_framer d_framer0;
38  int d_dlci0;
39  hdlc_framer d_framer1;
40  int d_dlci1;
41  queue<unsigned char> d_fifo;
42  int read_packet0(unsigned char * packet_buf);
43  int read_packet1(unsigned char * packet_buf);
44  int total_packets0;
45  int total_packets1;
46  public:
47  gr_hdlc_framer_2_channel_b_impl(int dlci_0, int dlci_1);
49 
50  // Where all the action really happens
51  void forecast (int noutput_items, gr_vector_int &ninput_items_required);
52 
53  int general_work(int noutput_items,
54  gr_vector_int &ninput_items,
55  gr_vector_const_void_star &input_items,
56  gr_vector_void_star &output_items);
57  };
58 
59  } // namespace framers
60 } // namespace gr
61 
62 #endif /* INCLUDED_FRAMERS_GR_HDLC_FRAMER_2_CHANNEL_B_IMPL_H */
63 
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
&lt;+description of block+&gt;
Definition: gr_hdlc_framer_2_channel_b.h:36
void forecast(int noutput_items, gr_vector_int &ninput_items_required)
Definition: hdlc_framer.h:46
gr_hdlc_framer_2_channel_b_impl(int dlci_0, int dlci_1)
Definition: gr_hdlc_framer_2_channel_b_impl.h:33