GNU Radio's GPS Package
gps_codegen_c_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_GPS_GPS_CODEGEN_C_IMPL_H
22 #define INCLUDED_GPS_GPS_CODEGEN_C_IMPL_H
23 
24 #include <gps/gps_codegen_c.h>
25 
26 namespace gr {
27  namespace gps {
28 
30  {
31  private:
32 
33  gr_complex code_LUT[1023];
34  long code_phase;
35  long code_phase_increment;
36 
37  int code_selection;
38  int datagen_mode;
39 
40  char random_data[22];
41  int data_counter;
42  void advance_random_data();
43 
44  public:
45  gps_codegen_c_impl(float, int, int);
47 
48  void set_code(int);
49  void set_sample_rate(float);
50 
51  void set_datamode(int);
52 
53  // Where all the action really happens
54  int work(int noutput_items,
55  gr_vector_const_void_star &input_items,
56  gr_vector_void_star &output_items);
57  };
58 
59  } // namespace gps
60 } // namespace gr
61 
62 #endif /* INCLUDED_GPS_GPS_CODEGEN_C_IMPL_H */
63 
void set_code(int)
Return a shared_ptr to a new instance of gps::gps_codegen_c.
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
Definition: gps_codegen_c_impl.h:29
<+description of block+>
Definition: gps_codegen_c.h:36
gps_codegen_c_impl(float, int, int)