GNU Radio's SATELLITES Package
nusat_decoder_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2017 Daniel Estevez <daniel@destevez.net>.
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_SATELLITES_NUSAT_DECODER_IMPL_H
22 #define INCLUDED_SATELLITES_NUSAT_DECODERR_IMPL_H
23 
25 #include <pmt/pmt.h>
26 
27 #include <stdint.h>
28 
29 #define MSG_LEN 64
30 #define HEADER_LEN 2
31 #define LEN_BYTE 0
32 #define CRC_BYTE 1
33 
34 namespace gr {
35  namespace satellites {
36 
38  {
39  private:
40  static const uint8_t d_scrambler_sequence[];
41  static const uint_fast8_t crc8_table[];
42  uint_fast8_t crc8(const uint8_t *data, size_t data_len);
43 
44  public:
47 
48  // Where all the action really happens
49  void forecast (int noutput_items, gr_vector_int &ninput_items_required);
50 
51  int general_work(int noutput_items,
52  gr_vector_int &ninput_items,
53  gr_vector_const_void_star &input_items,
54  gr_vector_void_star &output_items);
55 
56  void msg_handler (pmt::pmt_t pmt_msg);
57  };
58 
59  } // namespace satellites
60 } // namespace gr
61 
62 #endif /* INCLUDED_SATELLITES_NUSAT_DECODER_IMPL_H */
63 
Definition: nusat_decoder_impl.h:38
void msg_handler(pmt::pmt_t pmt_msg)
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
void forecast(int noutput_items, gr_vector_int &ninput_items_required)
<+description of block+>
Definition: nusat_decoder.h:37
Definition: ao40_deinterleaver.h:25