Fixed spelling error: s/writeable/writable/g
[debian/gnuradio] / gr-msdd6000 / src / python / test_udp.py
1 #!/usr/bin/python
2
3 from socket import *
4 import string
5 import time
6 import struct;
7
8
9 port = 10001
10 host = "10.45.4.43"
11
12 myaddr = ("10.45.1.229",10000);
13
14 buf = 1024;
15
16 UDPSock = socket(AF_INET,SOCK_DGRAM);
17 UDPSock.bind(myaddr);
18
19 f_mhz = 2400;
20 f_hz = 1;
21 gain = 3;
22 samples = 512;
23 decim = 2;
24 sets = 16;
25
26
27 req_data = struct.pack("<IIIIIIIIII", 0x0001, 0x0002, f_mhz, f_hz, gain, samples, decim, sets);
28 data = struct.pack("<II", 0x0000, 0x0000);
29
30
31
32 UDPSock.sendto(stat_data, (host,port))
33
34
35 print "sent"
36
37 data,addr = UDPSock.recvfrom(buf);
38 print "got response"
39
40