lots of example and other useful code for use with the softronics msdd6000
[debian/gnuradio] / gr-msdd6000 / src / non_gr_snapshot_tool / msdd6000.h
1 #ifndef MSDD6000_H
2 #define MSDD6000_H
3
4 #include <netinet/in.h>
5 #include <arpa/inet.h>
6 #include <linux/socket.h>
7
8 #define DEBUG(A)        printf("=debug=> %s\n", A)
9
10 #define STATE_STOPPED   0
11 #define STATE_STARTED   1
12
13 class MSDD6000 {
14         public:
15                 MSDD6000(char* addr);
16                 
17                 void set_decim(int decim_pow2);
18                 void set_fc(int center_mhz, int offset_hz);     
19                 void set_ddc_gain(int gain);
20                 void set_rf_attn(int attn);
21
22                 void set_output(int mode, void* arg);
23
24                 void start();
25                 void stop();
26         
27                 void send_request(float,float,float,float,float);       
28                 int read(char*, int);
29
30         private:
31                 int d_decim;
32                 int d_fc_mhz;
33                 int d_offset_hz;
34                 int d_rf_attn;
35                 int d_ddc_gain;
36
37 //              in_addr d_adx;  
38                 in_addr d_myadx;        
39
40                 struct sockaddr_in d_sockaddr;
41                 struct sockaddr_in d_mysockaddr;
42         
43                 int d_sock;
44                 int d_state;
45 };
46
47
48
49
50
51
52 #endif