diff options
author | n4hy | 2008-07-04 01:26:58 +0000 |
---|---|---|
committer | n4hy | 2008-07-04 01:26:58 +0000 |
commit | ae0ca251c8384b97ef1ba69a13c02227a57eaa54 (patch) | |
tree | b6c309a320c12f8798878461b83b110e9a6d2578 /gr-msdd6000/src/python_test/flood_udp.py | |
parent | 20615905cd0bf22772740d132be439bcf7ec4d8d (diff) | |
download | gnuradio-ae0ca251c8384b97ef1ba69a13c02227a57eaa54.tar.gz gnuradio-ae0ca251c8384b97ef1ba69a13c02227a57eaa54.tar.bz2 gnuradio-ae0ca251c8384b97ef1ba69a13c02227a57eaa54.zip |
cleaning up and putting much better code in. Step 1 of 2
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@8778 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-msdd6000/src/python_test/flood_udp.py')
-rw-r--r-- | gr-msdd6000/src/python_test/flood_udp.py | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/gr-msdd6000/src/python_test/flood_udp.py b/gr-msdd6000/src/python_test/flood_udp.py new file mode 100644 index 000000000..e59208a7a --- /dev/null +++ b/gr-msdd6000/src/python_test/flood_udp.py @@ -0,0 +1,60 @@ +#!/usr/bin/python + +from socket import * +import string +import time +import struct; +import random; + +msdd_port = 10001 +msdd_host = "10.45.4.43" + +my_udp_addr = ("10.45.1.229",10001); + +buf = 1024; + +#myport = random.randint(1025,65535); +#my_tcp_addr = ("10.45.1.229",myport); +#TCPSock = socket(AF_INET,SOCK_STREAM); +#TCPSock.bind(my_tcp_addr); +#TCPSock.connect((msdd_host,msdd_port)); + +UDPSock = socket(AF_INET,SOCK_DGRAM); +UDPSock.bind(my_udp_addr); + +SETS_STREAM = 0xffffffff; + +f_mhz = 2400; +f_hz = 1; +gain = 3; +samples = 512; +decim = 4; +#sets = 16; +sets = SETS_STREAM; +window = 3; +mode = 1; + + + +for first_byte in range(0,0xff): + for second_byte in range(0,0xff): + for third_byte in range(0,0xff): + data = struct.pack("!III", first_byte, second_byte,third_byte); + UDPSock.sendto(data, (msdd_host,msdd_port)) + + +# construct the 3 different request type packets +#fft_data = struct.pack("<IIIIIIIIII", 0x02, 0x20, f_mhz, f_hz, gain,window, samples, decim, mode,sets); +#raw_data = struct.pack("<IIIIIIII", 0x01, 0x18, f_mhz, f_hz, gain,samples, decim,sets); +#stat_data = struct.pack("!II", 0x0000, 0x0000) + +# send appropriate udp request packet + + + + + + + + + |