TCP communication sample for mbed classic by using 3 GR-PEACHs.
Dependencies: EthernetInterface mbed-rtos mbed
TCPPacket.h
00001 /* GR-PEACH No1 */ 00002 #define PEACH_1_IP_ADDRESS "192.168.2.1" 00003 #define PEACH_1_PORT 11000 00004 00005 /* GR-PEACH No2 */ 00006 #define PEACH_2_IP_ADDRESS "192.168.2.2" 00007 #define PEACH_2_PORT 12000 00008 00009 /* GR-PEACH No3 */ 00010 #define PEACH_3_IP_ADDRESS "192.168.2.3" 00011 #define PEACH_3_PORT 13000 00012 00013 /* Other */ 00014 #define SUB_NET_MASK "255.255.255.0" 00015 #define DEFAULT_GATEWAY "192.168.2.200" 00016 00017 00018 #define TCPSEND_CONN_RETRY_MAX (3) 00019 #define CONN_SUCCESS (0) 00020 #define CONN_FAIL (-1) 00021 00022 00023 struct tcp_packet { 00024 uint32_t data; 00025 };
Generated on Fri Jul 15 2022 19:13:56 by 1.7.2