![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
First version
Dependencies: mbed EthernetInterface mbed-rto
main.cpp@30:915f6cb7ffa5, 2018-04-25 (annotated)
- Committer:
- KlaasGovaerts
- Date:
- Wed Apr 25 14:51:18 2018 +0000
- Revision:
- 30:915f6cb7ffa5
- Parent:
- 29:996da48a265c
- Child:
- 32:537005b4a065
- Child:
- 35:efdbfccf2678
Reciever werkt multithreaded
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
KlaasGovaerts | 0:98e4994363bf | 1 | #include "mbed.h" |
KlaasGovaerts | 20:fe6a58e84929 | 2 | #include "rtos.h" |
KlaasGovaerts | 18:5ee34e60a31d | 3 | #include "Interpreter.h" |
KlaasGovaerts | 5:9903a0906a72 | 4 | #include "TCPlistener.h" |
KlaasGovaerts | 29:996da48a265c | 5 | #include "Receiver.h" |
KlaasGovaerts | 29:996da48a265c | 6 | |
KlaasGovaerts | 30:915f6cb7ffa5 | 7 | void receive(Queue<int,8>* queue){ |
KlaasGovaerts | 29:996da48a265c | 8 | Receiver receiver(queue); |
KlaasGovaerts | 29:996da48a265c | 9 | receiver.start(); |
KlaasGovaerts | 29:996da48a265c | 10 | } |
KlaasGovaerts | 29:996da48a265c | 11 | |
KlaasGovaerts | 2:1c9645acea2f | 12 | int main (void){ |
KlaasGovaerts | 30:915f6cb7ffa5 | 13 | Queue<int,8> queue; |
KlaasGovaerts | 24:bf62c46acb3e | 14 | |
KlaasGovaerts | 29:996da48a265c | 15 | Thread recieverThread; |
KlaasGovaerts | 30:915f6cb7ffa5 | 16 | while(true){ |
KlaasGovaerts | 30:915f6cb7ffa5 | 17 | recieverThread.start(receive,&queue); |
KlaasGovaerts | 30:915f6cb7ffa5 | 18 | } |
KlaasGovaerts | 3:0d013b7e4dea | 19 | } |