msdd6000 source upgraded and enabled
[debian/gnuradio] / gr-msdd6000 / src / msdd_source_simple.h
1 #ifndef INCLUDED_MSDD_SOURCE_SIMPLE_H
2 #define INCLUDED_MSDD_SOURCE_SIMPLE_H
3
4 #include <stdexcept>
5 #include <sys/socket.h>
6 #include <netinet/in.h>
7 #include <arpa/inet.h>
8 #include <stdio.h>
9 #include <gr_sync_block.h>
10 #include <msdd6000.h>
11
12
13 class msdd_source_simple;
14 typedef boost::shared_ptr<msdd_source_simple> msdd_source_simple_sptr;
15
16
17 // public shared_ptr constructor
18
19 msdd_source_simple_sptr msdd_make_source_simple ( const char *src, unsigned short port_src);
20
21
22
23 class msdd_source_simple : public gr_sync_block {
24  private:
25   friend msdd_source_simple_sptr
26   msdd_make_source_simple ( const char *src, unsigned short port_src);
27
28   MSDD6000* rcv;
29   int d_lastseq;
30
31  protected:
32   msdd_source_simple (const char *src, unsigned short port_src);
33
34  public:
35   ~msdd_source_simple ();
36   int ninput_bytes_reqd_for_noutput_items(int out);
37   bool stop();
38   bool start();
39
40   bool set_decim_rate(unsigned int);
41   bool set_rx_freq(int,double);
42   bool set_pga(int,double);
43
44   int work(int, gr_vector_const_void_star&, gr_vector_void_star&);
45   
46   long adc_freq();
47   int decim_rate();
48   std::vector<int> gain_range();
49   std::vector<float> freq_range();
50 };
51
52 #endif /* INCLUDED_MSDD_SOURCE_C_H */