![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
First version
Dependencies: mbed EthernetInterface mbed-rto
main.cpp@5:9903a0906a72, 2018-03-28 (annotated)
- Committer:
- KlaasGovaerts
- Date:
- Wed Mar 28 14:19:06 2018 +0000
- Revision:
- 5:9903a0906a72
- Parent:
- 4:0413d42377d1
- Child:
- 12:f3db7045e220
- Child:
- 25:1dc7dfe499fd
Versie 28/03
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
KlaasGovaerts | 0:98e4994363bf | 1 | #include "mbed.h" |
albireo987 | 1:3e5c46178d7f | 2 | #include "rtos.h" |
KlaasGovaerts | 3:0d013b7e4dea | 3 | #include "Receiver.h" |
KlaasGovaerts | 5:9903a0906a72 | 4 | #include "TCPlistener.h" |
KlaasGovaerts | 2:1c9645acea2f | 5 | |
KlaasGovaerts | 2:1c9645acea2f | 6 | int main (void){ |
KlaasGovaerts | 5:9903a0906a72 | 7 | |
KlaasGovaerts | 5:9903a0906a72 | 8 | UDPSocket server; |
KlaasGovaerts | 5:9903a0906a72 | 9 | |
KlaasGovaerts | 5:9903a0906a72 | 10 | TCPlistener listener; |
KlaasGovaerts | 5:9903a0906a72 | 11 | char command[512]; |
KlaasGovaerts | 5:9903a0906a72 | 12 | listener.receivePacket(command,sizeof(command)); |
KlaasGovaerts | 5:9903a0906a72 | 13 | |
KlaasGovaerts | 5:9903a0906a72 | 14 | #if 0 |
KlaasGovaerts | 3:0d013b7e4dea | 15 | Mutex* lock=new Mutex(); |
KlaasGovaerts | 3:0d013b7e4dea | 16 | int LED[12]; |
KlaasGovaerts | 3:0d013b7e4dea | 17 | for(int i=0;i<12;i++){ |
KlaasGovaerts | 4:0413d42377d1 | 18 | LED[i]=-1; |
KlaasGovaerts | 3:0d013b7e4dea | 19 | } |
KlaasGovaerts | 3:0d013b7e4dea | 20 | |
KlaasGovaerts | 5:9903a0906a72 | 21 | Receiver receiver(LED,lock); |
KlaasGovaerts | 5:9903a0906a72 | 22 | reciever.init(); |
KlaasGovaerts | 5:9903a0906a72 | 23 | #endif |
KlaasGovaerts | 4:0413d42377d1 | 24 | |
KlaasGovaerts | 4:0413d42377d1 | 25 | /* |
KlaasGovaerts | 3:0d013b7e4dea | 26 | Thread receiverThread; |
KlaasGovaerts | 5:9903a0906a72 | 27 | |
KlaasGovaerts | 3:0d013b7e4dea | 28 | receiverThread.start(receiver.run); |
KlaasGovaerts | 4:0413d42377d1 | 29 | */ |
KlaasGovaerts | 3:0d013b7e4dea | 30 | |
KlaasGovaerts | 3:0d013b7e4dea | 31 | |
KlaasGovaerts | 3:0d013b7e4dea | 32 | //std::thread receiverThread(&Receiver::run, &receiver); |
KlaasGovaerts | 3:0d013b7e4dea | 33 | |
KlaasGovaerts | 3:0d013b7e4dea | 34 | |
KlaasGovaerts | 3:0d013b7e4dea | 35 | /* |
KlaasGovaerts | 3:0d013b7e4dea | 36 | |
KlaasGovaerts | 3:0d013b7e4dea | 37 | Thread ledThread; |
KlaasGovaerts | 3:0d013b7e4dea | 38 | |
KlaasGovaerts | 3:0d013b7e4dea | 39 | receiverThread.start(Receiver); |
KlaasGovaerts | 3:0d013b7e4dea | 40 | */ |
KlaasGovaerts | 3:0d013b7e4dea | 41 | } |