OpenCores
URL https://opencores.org/ocsvn/udp_ip_stack/udp_ip_stack/trunk

Subversion Repositories udp_ip_stack

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /udp_ip_stack/tags
    from Rev 3 to Rev 1
    Reverse comparison

Rev 3 → Rev 1

/v1.0/rtl/vhdl/axi.vhd File deleted
/v1.0/rtl/vhdl/arp.vhd File deleted
/v1.0/doc/UDP_IP_Stack.pdf Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
v1.0/doc/UDP_IP_Stack.pdf Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: v1.0/doc/src/zero latency receive.jpg =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: v1.0/doc/src/zero latency receive.jpg =================================================================== --- v1.0/doc/src/zero latency receive.jpg (revision 3) +++ v1.0/doc/src/zero latency receive.jpg (nonexistent)
v1.0/doc/src/zero latency receive.jpg Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: v1.0/doc/src/UDP_IP_Stack.pptx =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: v1.0/doc/src/UDP_IP_Stack.pptx =================================================================== --- v1.0/doc/src/UDP_IP_Stack.pptx (revision 3) +++ v1.0/doc/src/UDP_IP_Stack.pptx (nonexistent)
v1.0/doc/src/UDP_IP_Stack.pptx Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: v1.0/sw/UDPTest.java =================================================================== --- v1.0/sw/UDPTest.java (revision 3) +++ v1.0/sw/UDPTest.java (nonexistent) @@ -1,34 +0,0 @@ -package com.pjf; - -import java.io.IOException; -import java.net.SocketException; -import java.net.UnknownHostException; - -public class UDPTest { - private UDPCxn cxn; - - public UDPTest() throws SocketException, UnknownHostException { - cxn = new UDPCxn("192.168.5.9"); - } - - public void go() throws IOException { - String fix1 = "1=45~34=201~18=23~"; - cxn.fixSend(fix1, 2000, true); - byte[] rep = cxn.rcv(); - String reply = new String(rep); - System.out.println("Got [" + reply + "]"); - } - - - public static void main(String[] args) { - UDPTest ut; - try { - ut = new UDPTest(); - ut.go(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - -} Index: v1.0/sw/test_results/UDPTestStream_console.txt =================================================================== --- v1.0/sw/test_results/UDPTestStream_console.txt (revision 3) +++ v1.0/sw/test_results/UDPTestStream_console.txt (nonexistent) @@ -1,152 +0,0 @@ -Sending price tick 225 -Sending price tick 224 -Sending price tick 223 -Sending price tick 222 -Sending price tick 221 -Sending price tick 220 -Sending price tick 219 -Sending price tick 218 -Sending price tick 217 -Sending price tick 216 -Sending price tick 215 -Sending price tick 214 -Sending price tick 213 -Sending price tick 212 -Sending price tick 211 -Sending price tick 210 -Sending price tick 209 -Sending price tick 208 -Sending price tick 207 -Sending price tick 206 -Sending price tick 205 -Sending price tick 204 -Sending price tick 203 -Sending price tick 202 -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Sending price tick 201 -Sending price tick 200 -Sending price tick 199 -Got [@ABC] -Sending price tick 198 -Sending price tick 197 -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Sending price tick 196 -Sending price tick 195 -Got [@ABC] -Sending price tick 194 -Sending price tick 193 -Got [@ABC] -Sending price tick 192 -Sending price tick 191 -Got [@ABC] -Sending price tick 190 -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Sending price tick 189 -Sending price tick 188 -Sending price tick 187 -Got [@ABC] -Got [@ABC] -Sending price tick 186 -Got [@ABC] -Sending price tick 185 -Sending price tick 184 -Got [@ABC] -Sending price tick 183 -Got [@ABC] -Got [@ABC] -Got [@ABC] -Sending price tick 182 -Sending price tick 181 -Got [@ABC] -Sending price tick 180 -Got [@ABC] -Sending price tick 179 -Got [@ABC] -Sending price tick 178 -Sending price tick 177 -Got [@ABC] -Sending price tick 176 -Got [@ABC] -Sending price tick 175 -Got [@ABC] -Got [@ABC] -Sending price tick 174 -Sending price tick 173 -Got [@ABC] -Sending price tick 172 -Got [@ABC] -Got [@ABC] -Got [@ABC] -Sending price tick 171 -Sending price tick 170 -Got [@ABC] -Sending price tick 169 -Sending price tick 168 -Got [@ABC] -Sending price tick 167 -Sending price tick 166 -Got [@ABC] -Sending price tick 165 -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Sending price tick 164 -Got [@ABC] -Sending price tick 163 -Sending price tick 162 -Got [@ABC] -Sending price tick 161 -Got [@ABC] -Sending price tick 160 -Got [@ABC] -Sending price tick 159 -Sending price tick 158 -Got [@ABC] -Sending price tick 157 -Sending price tick 156 -Got [@ABC] -Sending price tick 155 -Got [@ABC] -Sending price tick 154 -Got [@ABC] -Sending price tick 153 -Got [@ABC] -Sending price tick 152 -Got [@ABC] -Got [@ABC] -Got [@ABC] -Got [@ABC] -Sending price tick 151 -Sending price tick 150 -Got [@ABC] -Got [@ABC] Index: v1.0/sw/test_results/UDPTestStream_wireshark.pcap =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: v1.0/sw/test_results/UDPTestStream_wireshark.pcap =================================================================== --- v1.0/sw/test_results/UDPTestStream_wireshark.pcap (revision 3) +++ v1.0/sw/test_results/UDPTestStream_wireshark.pcap (nonexistent)
v1.0/sw/test_results/UDPTestStream_wireshark.pcap Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: v1.0/sw/test_results/UDPTest_console.txt =================================================================== --- v1.0/sw/test_results/UDPTest_console.txt (revision 3) +++ v1.0/sw/test_results/UDPTest_console.txt (nonexistent) @@ -1,2 +0,0 @@ -Sending packet: 1=45~34=201~18=23~ on port 2000 -Got [@ABC] Index: v1.0/sw/test_results/UDPTest_wireshark.pcap =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: v1.0/sw/test_results/UDPTest_wireshark.pcap =================================================================== --- v1.0/sw/test_results/UDPTest_wireshark.pcap (revision 3) +++ v1.0/sw/test_results/UDPTest_wireshark.pcap (nonexistent)
v1.0/sw/test_results/UDPTest_wireshark.pcap Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: v1.0/sw/UDPCxn.java =================================================================== --- v1.0/sw/UDPCxn.java (revision 3) +++ v1.0/sw/UDPCxn.java (nonexistent) @@ -1,72 +0,0 @@ -package com.pjf; - -import java.io.IOException; -import java.net.DatagramPacket; -import java.net.DatagramSocket; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; - - -public class UDPCxn { - private DatagramSocket skt; - private InetAddress dstIP; - - public UDPCxn(long dstIPadr) throws SocketException, UnknownHostException { - skt = new DatagramSocket(); - byte[] target = new byte[4]; - target[0] = (byte) ((dstIPadr >> 24) & 0xff); - target[1] = (byte) ((dstIPadr >> 16) & 0xff); - target[2] = (byte) ((dstIPadr >> 8) & 0xff); - target[3] = (byte) (dstIPadr & 0xff); - dstIP = InetAddress.getByAddress(target); - } - - public UDPCxn(String dstIPadr) throws SocketException, UnknownHostException { - skt = new DatagramSocket(); - String[] parts = dstIPadr.split("[.]"); - if (parts.length != 4) { - throw new UnknownHostException("ip addr must have 4 parts"); - } - byte[] target = new byte[4]; - for (int i = 0; i<4; i++) { - target[i] = (byte) Integer.parseInt(parts[i]); - } - dstIP = InetAddress.getByAddress(target); - } - - public void send(byte[] data, int port) throws IOException { - DatagramPacket pkt = new DatagramPacket(data, data.length, dstIP, port); - System.out.println("Sending packet"); - skt.send(pkt); - } - - public void fixSend(String str, int port, boolean print) throws IOException { - String s1 = str.replace('~','\001'); - byte[] data = s1.getBytes(); - DatagramPacket pkt = new DatagramPacket(data, data.length, dstIP, port); - if (print) { - System.out.println("Sending packet: " + str + " on port " + port); - } - skt.send(pkt); - } - - - public byte[] rcv() throws IOException { - byte[] buf = new byte[1024]; - DatagramPacket pkt = new DatagramPacket(buf, buf.length); -// System.out.println("waiting to receive ..."); - skt.receive(pkt); - int len = pkt.getLength(); - byte[] rd = pkt.getData(); - byte[] data = new byte[len]; - for (int i=0; i=150; price--) { - StringBuffer fixmsg = new StringBuffer(fix1); - fixmsg.append(Integer.toString(price)); - fixmsg.append(fix2); - System.out.println("Sending price tick " + price); - cxn.fixSend(fixmsg.toString(), 2000, false); - } - Thread.sleep(2000); - } - - - public static void main(String[] args) { - UDPTestStream ut; - try { - ut = new UDPTestStream(); - ut.go(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - -}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.