Changeset 20 in flair-src
- Timestamp:
- Apr 12, 2016, 4:26:41 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/FrameworkManager_impl.cpp
r15 r20 101 101 ui_defined = false; 102 102 rcv_buf = NULL; 103 gcs_watchdog = NULL; 103 104 _this = this; 104 105 … … 215 216 UDT::setsockopt(file_sock, 0, UDT_RCVSYN, &blocking, sizeof(bool)); 216 217 217 // configure timeout of blocking receive, short timeout to have priority on 218 // the other socket (see run method) 219 int timeout = 1; // ms 220 UDT::setsockopt(file_sock, 0, UDT_RCVTIMEO, &timeout, sizeof(int)); 221 222 timeout = 100; // ms 218 int timeout = 100; // ms 223 219 UDT::setsockopt(com_sock, 0, UDT_RCVTIMEO, &timeout, sizeof(int)); 224 220 … … 453 449 Err("UDT::sendmsg error, sent %i/%i\n", nb_write, 1); 454 450 } 451 452 //wait end ACK 453 int nb_read = UDT::recvmsg(file_sock,&buf,1); 454 if(nb_read<0) { 455 Err("UDT::recvmsg error (%s)\n",UDT::getlasterror().getErrorMessage()); 456 } else if (nb_read != 1) { 457 Err("UDT::recvmsg error, sent %i/%i\n",nb_read,1); 458 } 455 459 } 456 460 … … 813 817 } else // stop logging 814 818 { 819 //disable watchdog temporarly 820 //this is necessary because GCS is no longer sending the heartbeat when receiving files... 821 //TODO: add a thread in GCS for receiving file 822 //but be careful that with a xbee modem for exemple, sending files can saturate communication and 823 //avoid the heartbeat to be received... so disabling watchdog is not a so bad option... 824 if(caller->gcs_watchdog!=NULL) { 825 caller->gcs_watchdog->SafeStop(); 826 caller->gcs_watchdog->Join(); 827 } 815 828 for (size_t i = 0; i < logs.size(); i++) { 816 829 if (logs.at(i).dbtFile != NULL) { … … 837 850 838 851 logs.clear(); 852 //enable watchdog again 853 if(caller->gcs_watchdog!=NULL) { 854 caller->gcs_watchdog->Start(); 855 } 839 856 } 840 857 } -
trunk/lib/FlairCore/src/Thread_impl.cpp
r15 r20 70 70 71 71 isRunning = true; 72 tobestopped = false; 73 is_suspended = false; 72 74 73 75 #ifdef __XENO__ -
trunk/tools/FlairGCS/src/UdtSocket.cpp
r15 r20 192 192 file_dialog->endOfFiles(); 193 193 flag_new_seq = true; 194 //end ack 195 UDT::sendmsg(file_socket,&recv_buf[0],1); 194 196 } 195 197 }
Note:
See TracChangeset
for help on using the changeset viewer.