demo versie 16/05

Dependencies:   EthernetInterface mbed-rto mbed

Fork of ProjectVLC by Klaas Govaerts

Receiver.h

Committer:
albireo987
Date:
2018-05-16
Revision:
80:dbda5092950e
Parent:
76:c0c7c3f37be2

File content as of revision 80:dbda5092950e:

#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