Changeset 55 in flair-src for trunk/lib/FlairCore/src
- Timestamp:
- Jul 28, 2016, 5:55:31 PM (8 years ago)
- Location:
- trunk/lib/FlairCore/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/FrameworkManager.cpp
r45 r55 133 133 } 134 134 135 void FrameworkManager::SetupConnection(string address, uint16_t port, 135 void FrameworkManager::SetupConnection(string address, uint16_t port,Time watchdogTimeout, 136 136 size_t rcv_buf_size) { 137 137 pimpl_->SetupConnection(address, port, rcv_buf_size); … … 143 143 144 144 gui::TabWidget *FrameworkManager::GetTabWidget(void) const { 145 if(pimpl_->tabwidget==NULL) Err("SetupUserInterface must be called before\n"); 145 146 return pimpl_->tabwidget; 146 147 } -
trunk/lib/FlairCore/src/FrameworkManager.h
r15 r55 19 19 20 20 namespace flair { 21 namespace gui {22 class TabWidget;23 class SendData;24 }21 namespace gui { 22 class TabWidget; 23 class SendData; 24 } 25 25 } 26 26 namespace flair { … … 69 69 * 70 70 * Call this method just after the constructor of this class. If this method is 71 *not called, the program will run headless. 71 * not called, the program will run headless. 72 * If this method is called, SetupUserInterface must also be called after this. 72 73 * 73 74 * \param address address of ground station 74 75 * \param port port of ground station 76 * \param watchdogTimeout watchdog timeout for the connection, passing TIME_INFINITE will disable the watchdog 75 77 * \param rcv_buf_size receive buffer size 76 78 */ 77 void SetupConnection(std::string address, uint16_t port, 79 void SetupConnection(std::string address, uint16_t port,Time watchdogTimeout=(Time)1000000000, 78 80 size_t rcv_buf_size = 10000); 79 81 … … 82 84 * 83 85 * If this method is called after SetupConnection, Widgets will be displayed in 84 *the ground station. 85 * Otherwise, it will run headless, but default values of Widgets will be taken 86 *from the xml file. 86 * the ground station. 87 * If this method is called and SetupConnection was not called, it will run headless but default values of Widgets will be taken 88 * from the xml file. 89 * If this method is not called, Widgets will not be available. Constructing an object based on Widget class will fail. 87 90 * 88 91 * \param xml_file xml file for default values of Widgets -
trunk/lib/FlairCore/src/FrameworkManager_impl.cpp
r51 r55 103 103 gcs_watchdog = NULL; 104 104 _this = this; 105 tabwidget=NULL; 105 106 106 107 // Avoids memory swapping for this program … … 193 194 } 194 195 195 void FrameworkManager_impl::SetupConnection(string address, uint16_t port, 196 void FrameworkManager_impl::SetupConnection(string address, uint16_t port,Time watchdogTimeout, 196 197 size_t rcv_buf_size) { 197 198 UDT::startup(); … … 804 805 if (tmp.running == true) // start logging 805 806 { 806 filename = 807 caller->log_path + "/" + caller->FileName(tmp.device) + ".dbt"; 808 printf("Creating log file %s (log size %i)\n", filename.c_str(), 809 (int)tmp.size); 807 filename = caller->log_path + "/" + caller->FileName(tmp.device) + ".dbt"; 808 printf("Creating log file %s (log size %i)\n", filename.c_str(), (int)tmp.size); 810 809 tmp.dbtFile = inithdFile((char *)filename.c_str(), UAV, tmp.size); 811 810 logs.push_back(tmp); -
trunk/lib/FlairCore/src/unexported/FrameworkManager_impl.h
r15 r55 43 43 FrameworkManager_impl(flair::core::FrameworkManager *self, std::string name); 44 44 ~FrameworkManager_impl(); 45 void SetupConnection(std::string address, uint16_t port, 45 void SetupConnection(std::string address, uint16_t port,flair::core::Time watchdogTimeout, 46 46 size_t rcv_buf_size = 10000); 47 47 void SetupUserInterface(std::string xml_file);
Note:
See TracChangeset
for help on using the changeset viewer.