First version

Dependencies:   mbed EthernetInterface mbed-rto

Committer:
KlaasGovaerts
Date:
Tue May 15 22:17:52 2018 +0000
Revision:
76:c0c7c3f37be2
Parent:
75:31c15986b85e
Added more documentation.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
KlaasGovaerts 24:bf62c46acb3e 1 #include "rtos.h"
KlaasGovaerts 29:996da48a265c 2 #include "Interpreter.h"
KlaasGovaerts 29:996da48a265c 3 #include "TCPlistener.h"
KlaasGovaerts 24:bf62c46acb3e 4
KlaasGovaerts 24:bf62c46acb3e 5 #ifndef RECEIVER_H
KlaasGovaerts 24:bf62c46acb3e 6 #define RECEIVER_H
KlaasGovaerts 76:c0c7c3f37be2 7 /**
KlaasGovaerts 76:c0c7c3f37be2 8 * A class used to receive commands via TCP and execute them.
KlaasGovaerts 76:c0c7c3f37be2 9 */
KlaasGovaerts 24:bf62c46acb3e 10 class Receiver{
KlaasGovaerts 24:bf62c46acb3e 11 private:
KlaasGovaerts 30:915f6cb7ffa5 12 Queue<int,8>* queue;
KlaasGovaerts 29:996da48a265c 13 Interpreter interpreter;
KlaasGovaerts 29:996da48a265c 14 TCPlistener listener;
KlaasGovaerts 29:996da48a265c 15 char command[512];
KlaasGovaerts 24:bf62c46acb3e 16 public:
KlaasGovaerts 75:31c15986b85e 17 /**
KlaasGovaerts 75:31c15986b85e 18 *@param queue The queue where received and interpreted commands will we pushed.
KlaasGovaerts 75:31c15986b85e 19 */
KlaasGovaerts 30:915f6cb7ffa5 20 Receiver(Queue<int,8>* queue);
KlaasGovaerts 75:31c15986b85e 21
KlaasGovaerts 75:31c15986b85e 22 /**
KlaasGovaerts 75:31c15986b85e 23 *Start a loop that will receive packets, and push their contents on the queue.
KlaasGovaerts 75:31c15986b85e 24 *This method should be called last.
KlaasGovaerts 75:31c15986b85e 25 */
KlaasGovaerts 29:996da48a265c 26 void start();
KlaasGovaerts 24:bf62c46acb3e 27 };
KlaasGovaerts 24:bf62c46acb3e 28 #endif