![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
First version
Dependencies: mbed EthernetInterface mbed-rto
Diff: main.cpp
- Revision:
- 29:996da48a265c
- Parent:
- 24:bf62c46acb3e
- Child:
- 30:915f6cb7ffa5
--- a/main.cpp Wed Apr 25 13:25:13 2018 +0000 +++ b/main.cpp Wed Apr 25 14:25:33 2018 +0000 @@ -2,16 +2,16 @@ #include "rtos.h" #include "Interpreter.h" #include "TCPlistener.h" - +#include "Receiver.h" + +void receive(Queue<int,8> *queue){ + Receiver receiver(queue); + receiver.start(); +} + int main (void){ Queue<int,8> *queue=new Queue<int,8>(); - Interpreter interpreter(queue); - TCPlistener listener; - char command[512]; - - while(true){ - listener.receiveSegment(command,sizeof(command)); - interpreter.executeCommand(command); - } + Thread recieverThread; + recieverThread.start(receive,queue); }