Machine Vision Status TCP Server
Dependencies: C12832 EthernetInterface mbed-rtos mbed ConfigFile
Diff: TcpDaemon.h
- Revision:
- 3:254a2671a8e3
- Parent:
- 2:a8eebf64cd3e
- Child:
- 4:339a85b66476
--- a/TcpDaemon.h Thu Mar 05 15:32:22 2015 +0000 +++ b/TcpDaemon.h Fri Mar 06 08:20:56 2015 +0000 @@ -13,6 +13,7 @@ public: const static int BUFFER_SIZE = 512; const static int TCP_TIMEOUT = 250; + const static int TCP_ACCEPT_TIMEOUT = 500; const static int MAX_READ_TIMEOUTS = 10; // Maximum number of times to retry to read for rest of message private: @@ -23,6 +24,7 @@ char buffer[BUFFER_SIZE+1]; bool keepListening; + DigitalOut accept_led; DigitalOut receive_led; public: @@ -31,7 +33,7 @@ * * @server_port the port the daemon will be listening on */ - TcpDaemon(int server_port, PinName receive_led_pin); + TcpDaemon(int server_port, PinName accept_led_pin, PinName receive_led_pin); /* * Make the daemon start listening for incoming connections