demo versie 16/05

Dependencies:   EthernetInterface mbed-rto mbed

Fork of ProjectVLC by Klaas Govaerts

Receiver.h

Committer:
KlaasGovaerts
Date:
2018-05-15
Revision:
76:c0c7c3f37be2
Parent:
75:31c15986b85e

File content as of revision 76:c0c7c3f37be2:

#include "rtos.h"
#include "Interpreter.h"
#include "TCPlistener.h"

#ifndef RECEIVER_H
#define RECEIVER_H
    /**
    * A class used to receive commands via TCP and execute them.
    */
    class Receiver{
        private:
            Queue<int,8>* queue;
            Interpreter interpreter;
            TCPlistener listener;
            char command[512];
        public:
            /**
            *@param queue The queue where received and interpreted commands will we pushed.
            */
            Receiver(Queue<int,8>* queue);
            
            /**
            *Start a loop that will receive packets, and push their contents on the queue.
            *This method should be called last.
            */
            void start();
    };
#endif