demo versie 16/05

Dependencies:   EthernetInterface mbed-rto mbed

Fork of ProjectVLC by Klaas Govaerts

Receiver.cpp

Committer:
KlaasGovaerts
Date:
2018-05-02
Revision:
35:efdbfccf2678
Parent:
31:915f6cb7ffa5

File content as of revision 35:efdbfccf2678:

#include "Receiver.h"

/**
*@param queue Queue where received segments will we pushed.
*/
Receiver::Receiver(Queue<int,8>* queue):interpreter(queue){
}

/**
*Start a loop that will receive packets, and push their contents on the queue.
*This method should only be called by a seperate thread, because the execution doesn't stop.
*/
void Receiver::start(){
    while(true){
            listener.receiveSegment(command,sizeof(command));
            interpreter.executeCommand(command);
    }
}