demo versie 16/05
Dependencies: EthernetInterface mbed-rto mbed
Fork of ProjectVLC by
main.cpp@6:9903a0906a72, 2018-03-28 (annotated)
- Committer:
- KlaasGovaerts
- Date:
- Wed Mar 28 14:19:06 2018 +0000
- Revision:
- 6:9903a0906a72
- Parent:
- 5:0413d42377d1
- Child:
- 12:1dc7dfe499fd
- Child:
- 13:f3db7045e220
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 | 4:0d013b7e4dea | 3 | #include "Receiver.h" |
KlaasGovaerts | 6:9903a0906a72 | 4 | #include "TCPlistener.h" |
KlaasGovaerts | 3:1c9645acea2f | 5 | |
KlaasGovaerts | 3:1c9645acea2f | 6 | int main (void){ |
KlaasGovaerts | 6:9903a0906a72 | 7 | |
KlaasGovaerts | 6:9903a0906a72 | 8 | UDPSocket server; |
KlaasGovaerts | 6:9903a0906a72 | 9 | |
KlaasGovaerts | 6:9903a0906a72 | 10 | TCPlistener listener; |
KlaasGovaerts | 6:9903a0906a72 | 11 | char command[512]; |
KlaasGovaerts | 6:9903a0906a72 | 12 | listener.receivePacket(command,sizeof(command)); |
KlaasGovaerts | 6:9903a0906a72 | 13 | |
KlaasGovaerts | 6:9903a0906a72 | 14 | #if 0 |
KlaasGovaerts | 4:0d013b7e4dea | 15 | Mutex* lock=new Mutex(); |
KlaasGovaerts | 4:0d013b7e4dea | 16 | int LED[12]; |
KlaasGovaerts | 4:0d013b7e4dea | 17 | for(int i=0;i<12;i++){ |
KlaasGovaerts | 5:0413d42377d1 | 18 | LED[i]=-1; |
KlaasGovaerts | 4:0d013b7e4dea | 19 | } |
KlaasGovaerts | 4:0d013b7e4dea | 20 | |
KlaasGovaerts | 6:9903a0906a72 | 21 | Receiver receiver(LED,lock); |
KlaasGovaerts | 6:9903a0906a72 | 22 | reciever.init(); |
KlaasGovaerts | 6:9903a0906a72 | 23 | #endif |
KlaasGovaerts | 5:0413d42377d1 | 24 | |
KlaasGovaerts | 5:0413d42377d1 | 25 | /* |
KlaasGovaerts | 4:0d013b7e4dea | 26 | Thread receiverThread; |
KlaasGovaerts | 6:9903a0906a72 | 27 | |
KlaasGovaerts | 4:0d013b7e4dea | 28 | receiverThread.start(receiver.run); |
KlaasGovaerts | 5:0413d42377d1 | 29 | */ |
KlaasGovaerts | 4:0d013b7e4dea | 30 | |
KlaasGovaerts | 4:0d013b7e4dea | 31 | |
KlaasGovaerts | 4:0d013b7e4dea | 32 | //std::thread receiverThread(&Receiver::run, &receiver); |
KlaasGovaerts | 4:0d013b7e4dea | 33 | |
KlaasGovaerts | 4:0d013b7e4dea | 34 | |
KlaasGovaerts | 4:0d013b7e4dea | 35 | /* |
KlaasGovaerts | 4:0d013b7e4dea | 36 | |
KlaasGovaerts | 4:0d013b7e4dea | 37 | Thread ledThread; |
KlaasGovaerts | 4:0d013b7e4dea | 38 | |
KlaasGovaerts | 4:0d013b7e4dea | 39 | receiverThread.start(Receiver); |
KlaasGovaerts | 4:0d013b7e4dea | 40 | */ |
KlaasGovaerts | 4:0d013b7e4dea | 41 | } |