voltando a versao de n aberturas e fechamentos de sockets data 19/09
Dependencies: EthernetInterface NTPClient mbed-rtos mbed EALib
Fork of header_main_publish by
debug.cpp@19:ab2088e0dec6, 2014-09-20 (annotated)
- Committer:
- klauss
- Date:
- Sat Sep 20 11:27:47 2014 +0000
- Revision:
- 19:ab2088e0dec6
- Parent:
- 8:e3bfe62a477e
colinas_02
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
klauss | 0:4d17cd9c8f9d | 1 | #include "debug.h" |
klauss | 0:4d17cd9c8f9d | 2 | #include "string.h" |
klauss | 0:4d17cd9c8f9d | 3 | |
klauss | 0:4d17cd9c8f9d | 4 | UDPSocket debug; |
klauss | 0:4d17cd9c8f9d | 5 | Endpoint debug_server; |
klauss | 0:4d17cd9c8f9d | 6 | char debug_msg1[ 1024+64 ]; |
klauss | 0:4d17cd9c8f9d | 7 | char debug_msg2[ 1024 ]; |
klauss | 0:4d17cd9c8f9d | 8 | |
klauss | 0:4d17cd9c8f9d | 9 | void debug_pkg( int size, uint8_t * pkg ){ |
klauss | 0:4d17cd9c8f9d | 10 | static uint8_t i=0; |
klauss | 0:4d17cd9c8f9d | 11 | strcpy( debug_msg1, "Pkg " ); |
klauss | 0:4d17cd9c8f9d | 12 | memcpy( debug_msg1+5, pkg, size ); |
klauss | 0:4d17cd9c8f9d | 13 | debug_msg1[ 4 ] = i++; |
klauss | 1:a1758104fa1d | 14 | debug.sendTo( debug_server, debug_msg1, size+5 ); |
klauss | 0:4d17cd9c8f9d | 15 | } |