demo versie 16/05

Dependencies:   EthernetInterface mbed-rto mbed

Fork of ProjectVLC by Klaas Govaerts

Committer:
KlaasGovaerts
Date:
Wed May 02 06:53:40 2018 +0000
Revision:
35:efdbfccf2678
Parent:
31:915f6cb7ffa5
Added documentation

Who changed what in which revision?

UserRevisionLine numberNew contents of line
KlaasGovaerts 30:996da48a265c 1 #include "Receiver.h"
KlaasGovaerts 30:996da48a265c 2
KlaasGovaerts 35:efdbfccf2678 3 /**
KlaasGovaerts 35:efdbfccf2678 4 *@param queue Queue where received segments will we pushed.
KlaasGovaerts 35:efdbfccf2678 5 */
KlaasGovaerts 31:915f6cb7ffa5 6 Receiver::Receiver(Queue<int,8>* queue):interpreter(queue){
KlaasGovaerts 30:996da48a265c 7 }
KlaasGovaerts 30:996da48a265c 8
KlaasGovaerts 35:efdbfccf2678 9 /**
KlaasGovaerts 35:efdbfccf2678 10 *Start a loop that will receive packets, and push their contents on the queue.
KlaasGovaerts 35:efdbfccf2678 11 *This method should only be called by a seperate thread, because the execution doesn't stop.
KlaasGovaerts 35:efdbfccf2678 12 */
KlaasGovaerts 30:996da48a265c 13 void Receiver::start(){
KlaasGovaerts 30:996da48a265c 14 while(true){
KlaasGovaerts 30:996da48a265c 15 listener.receiveSegment(command,sizeof(command));
KlaasGovaerts 30:996da48a265c 16 interpreter.executeCommand(command);
KlaasGovaerts 30:996da48a265c 17 }
KlaasGovaerts 30:996da48a265c 18 }