Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: PicoTCP lpc1768-picotcp-eth mbed-rtos mbed
Revision 0:ce982aead3d2, committed 2013-10-03
- Comitter:
- tass
- Date:
- Thu Oct 03 06:22:54 2013 +0000
- Commit message:
- UDP Tx Official Benchmark
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PicoTCP.lib Thu Oct 03 06:22:54 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/daniele/code/PicoTCP/#6764a53bb6e6
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lpc1768-picotcp-eth.lib Thu Oct 03 06:22:54 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/tass/code/lpc1768-picotcp-eth/#1ef61e7465a5
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Oct 03 06:22:54 2013 +0000
@@ -0,0 +1,49 @@
+#include "mbed.h"
+#include "EthernetInterface.h"
+
+#define BUFFER_SIZE 1024
+#define NUMBER_OF_SECONDS (20*1000u) // 20 seconds
+
+#define REMOTE_IP "192.168.100.2"
+#define REMOTE_PORT 2327
+#define NUMBER_OF_FRAMES 1000
+
+int main() {
+
+ EthernetInterface eth;
+ eth.init();
+ eth.connect();
+
+ printf("Started UDP Fast Test...\n");
+
+ UDPSocket server;
+ Endpoint endp;
+ char buffer[BUFFER_SIZE];
+
+ printf("Remote endpoint @ %s:%d\n",REMOTE_IP,REMOTE_PORT);
+ endp.set_address(REMOTE_IP,REMOTE_PORT);
+
+ printf("Binding result :%d\n", server.bind(REMOTE_PORT));
+
+ server.bind(REMOTE_PORT);
+ server.set_blocking(false,1000);
+
+ printf("Started sending packet flood...\n");
+
+ while(true)
+ {
+ int cnt = 0;
+ static uint32_t counter = 0;
+ while(cnt<5)
+ {
+ memcpy(buffer,&counter,sizeof(counter));
+ int size = server.sendTo(endp,buffer,sizeof(buffer));
+ counter++;
+ cnt++;
+ }
+ Thread::wait(1);
+ }
+
+ server.close();
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-rtos.lib Thu Oct 03 06:22:54 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed-rtos/#ee87e782d34f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Oct 03 06:22:54 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f \ No newline at end of file