GNU Radio's CCSDS Package
genCADU_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2018 <+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_CCSDS_GENCADU_IMPL_H
22 #define INCLUDED_CCSDS_GENCADU_IMPL_H
23 
24 #include <ccsds/genCADU.h>
25 //#include "fec/ReedSolomon/ReedSolomon.h"
27 #include "fec/rs/reedsolomon.h"
28 namespace gr {
29  namespace ccsds {
30 
31  class genCADU_impl : public genCADU
32  {
33  private:
34  int d_frameLength;
35  bool d_scramble;
36  int d_rs;
37  int d_basis;
38  int d_type;
39  int d_intDepth;
40  std::vector<unsigned char> d_sync;
41  std::vector<unsigned char> buffer;
42  //ReedSolomon *RS;
43  Scrambler *S;
44  //reedSolomon *rs;
45 
46 
47  protected:
48  int calculate_output_stream_length(const gr_vector_int &ninput_items);
49 
50  public:
51  unsigned char parse_hex(char c);
52  std::vector<unsigned char> parse_string(const std::string & s);
53  genCADU_impl(int frameLength,std::string sync, int scramble, int rs, int intDepth, std::string len_tag_key);
54  ~genCADU_impl();
55 
56  // Where all the action really happens
57  int work(int noutput_items,
58  gr_vector_int &ninput_items,
59  gr_vector_const_void_star &input_items,
60  gr_vector_void_star &output_items);
61  };
62 
63  } // namespace ccsds
64 } // namespace gr
65 
66 #endif /* INCLUDED_CCSDS_GENCADU_IMPL_H */
67 
<+description of block+>
Definition: genCADU.h:36
int work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
Definition: Scrambler.h:23
Definition: cc_depuncture.h:28
genCADU_impl(int frameLength, std::string sync, int scramble, int rs, int intDepth, std::string len_tag_key)
Definition: genCADU_impl.h:31
void scramble(uint8_t *data, uint32_t length)
Definition: Scrambler_CCSDS.h:44
int calculate_output_stream_length(const gr_vector_int &ninput_items)