Changeset 55 in flair-src for trunk/lib/FlairCore


Ignore:
Timestamp:
Jul 28, 2016, 5:55:31 PM (5 years ago)
Author:
Sanahuja Guillaume
Message:

simu gps

Location:
trunk/lib/FlairCore/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/FrameworkManager.cpp

    r45 r55  
    133133}
    134134
    135 void FrameworkManager::SetupConnection(string address, uint16_t port,
     135void FrameworkManager::SetupConnection(string address, uint16_t port,Time watchdogTimeout,
    136136                                       size_t rcv_buf_size) {
    137137  pimpl_->SetupConnection(address, port, rcv_buf_size);
     
    143143
    144144gui::TabWidget *FrameworkManager::GetTabWidget(void) const {
     145  if(pimpl_->tabwidget==NULL) Err("SetupUserInterface must be called before\n");
    145146  return pimpl_->tabwidget;
    146147}
  • trunk/lib/FlairCore/src/FrameworkManager.h

    r15 r55  
    1919
    2020namespace flair {
    21 namespace gui {
    22 class TabWidget;
    23 class SendData;
    24 }
     21  namespace gui {
     22    class TabWidget;
     23    class SendData;
     24  }
    2525}
    2626namespace flair {
     
    6969  *
    7070  * 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.
    7273  *
    7374  * \param address address of ground station
    7475  * \param port port of ground station
     76  * \param watchdogTimeout watchdog timeout for the connection, passing TIME_INFINITE will disable the watchdog
    7577  * \param rcv_buf_size receive buffer size
    7678  */
    77   void SetupConnection(std::string address, uint16_t port,
     79  void SetupConnection(std::string address, uint16_t port,Time watchdogTimeout=(Time)1000000000,
    7880                       size_t rcv_buf_size = 10000);
    7981
     
    8284  *
    8385  * 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.
    8790  *
    8891  * \param xml_file xml file for default values of Widgets
  • trunk/lib/FlairCore/src/FrameworkManager_impl.cpp

    r51 r55  
    103103  gcs_watchdog = NULL;
    104104  _this = this;
     105  tabwidget=NULL;
    105106
    106107  // Avoids memory swapping for this program
     
    193194}
    194195
    195 void FrameworkManager_impl::SetupConnection(string address, uint16_t port,
     196void FrameworkManager_impl::SetupConnection(string address, uint16_t port,Time watchdogTimeout,
    196197                                            size_t rcv_buf_size) {
    197198  UDT::startup();
     
    804805        if (tmp.running == true) // start logging
    805806        {
    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);
    810809          tmp.dbtFile = inithdFile((char *)filename.c_str(), UAV, tmp.size);
    811810          logs.push_back(tmp);
  • trunk/lib/FlairCore/src/unexported/FrameworkManager_impl.h

    r15 r55  
    4343  FrameworkManager_impl(flair::core::FrameworkManager *self, std::string name);
    4444  ~FrameworkManager_impl();
    45   void SetupConnection(std::string address, uint16_t port,
     45  void SetupConnection(std::string address, uint16_t port,flair::core::Time watchdogTimeout,
    4646                       size_t rcv_buf_size = 10000);
    4747  void SetupUserInterface(std::string xml_file);
Note: See TracChangeset for help on using the changeset viewer.