Changeset 137 in flair-src for trunk/tools/Controller/Mavlink


Ignore:
Timestamp:
02/14/17 15:06:20 (5 years ago)
Author:
Sanahuja Guillaume
Message:

singleton manager

Location:
trunk/tools/Controller/Mavlink/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/Controller/Mavlink/src/Forwarder.cpp

    r88 r137  
    2828using namespace flair::core;
    2929
    30 Forwarder::Forwarder(const FrameworkManager *parent, string name, string &inputAddress,
     30Forwarder::Forwarder(string name, string &inputAddress,
    3131                                         int inputPort, string &outputAddress, int outputPort):
    32                                          Thread(parent, name, 6), inputAddress(inputAddress),
     32                                         Thread(getFrameworkManager(), name, 6), inputAddress(inputAddress),
    3333                                         inputPort(inputPort), outputAddress(outputAddress),
    3434                                         outputPort(outputPort) {
  • trunk/tools/Controller/Mavlink/src/Forwarder.h

    r88 r137  
    2525namespace flair {
    2626namespace core {
    27   class FrameworkManager;
    2827  class Socket;
    2928}
     
    3332public:
    3433
    35   Forwarder(const flair::core::FrameworkManager *parent, std::string name,
     34  Forwarder(std::string name,
    3635                        std::string &inputAddress, int inputPort,
    3736                        std::string &outputAddress, int outputPort);
  • trunk/tools/Controller/Mavlink/src/GuiFlair.cpp

    r88 r137  
    2020#include "GuiInterface.h"
    2121
    22 #include <FrameworkManager.h>
    2322#include <Socket.h>
    2423
     
    3130using namespace flair::gui;
    3231
    33 GuiFlair::GuiFlair(const FrameworkManager *parent, string name):
    34                                    GuiInterface(parent, name) {
     32GuiFlair::GuiFlair(string name):
     33                                   GuiInterface(name) {
    3534        cout << "MavPlanner GuiFlair constructor" << endl;
    3635
  • trunk/tools/Controller/Mavlink/src/GuiFlair.h

    r88 r137  
    2626namespace flair {
    2727namespace core {
    28   class FrameworkManager;
    2928  class Socket;
    3029}
     
    3433public:
    3534
    36   GuiFlair(const flair::core::FrameworkManager *parent, std::string name);
     35  GuiFlair(std::string name);
    3736  ~GuiFlair();
    3837
  • trunk/tools/Controller/Mavlink/src/GuiGcs.cpp

    r88 r137  
    2121
    2222#include <Socket.h>
    23 #include <FrameworkManager.h>
    2423
    2524#include "MavlinkUDP.h"
     
    3635const std::string delimiter = "|";
    3736
    38 GuiGcs::GuiGcs(const FrameworkManager *parent, string name,
     37GuiGcs::GuiGcs(string name,
    3938                           std::string &outputAddress, int outputPort):
    40                            GuiInterface(parent, name) {
     39                           GuiInterface(name) {
    4140  cout << "MavPlanner GuiGcs constructor" << endl;
    4241  //outputSocket = new Socket((Thread *)this, "output socket", outputAddress + ":" + to_string(outputPort));
  • trunk/tools/Controller/Mavlink/src/GuiGcs.h

    r88 r137  
    3232namespace flair {
    3333namespace core {
    34   class FrameworkManager;
    3534  class Socket;
    3635}
     
    4039public:
    4140
    42   GuiGcs(const flair::core::FrameworkManager *parent, std::string name,
     41  GuiGcs(std::string name,
    4342                 std::string &outputAddress, int outputPort);
    4443  ~GuiGcs();
  • trunk/tools/Controller/Mavlink/src/GuiInterface.cpp

    r88 r137  
    3939using namespace std;
    4040
    41 GuiInterface::GuiInterface(const FrameworkManager *parent, string name)
    42                   : Thread(parent, name, 6),
    43                   mainTab(new Tab(parent->GetTabWidget(), name)) {
     41GuiInterface::GuiInterface(string name)
     42                  : Thread(getFrameworkManager(), name, 6),
     43                  mainTab(new Tab(getFrameworkManager()->GetTabWidget(), name)) {
    4444
    4545  tabWidget = new TabWidget(mainTab->NewRow(), name);
  • trunk/tools/Controller/Mavlink/src/GuiInterface.h

    r88 r137  
    2424namespace flair {
    2525namespace core {
    26   class FrameworkManager;
    2726  class Socket;
    2827}
     
    4241public:
    4342
    44   GuiInterface(const flair::core::FrameworkManager *parent, std::string name);
     43  GuiInterface(std::string name);
    4544  ~GuiInterface();
    4645
  • trunk/tools/Controller/Mavlink/src/main.cpp

    r88 r137  
    5656
    5757  if(mode == "forward") {
    58     Forwarder *guiForwarder = new Forwarder(manager, "Forwarder",
     58    Forwarder *guiForwarder = new Forwarder("Forwarder",
    5959                                           inputAddress, inputPort,
    6060                                           outputAddress, outputPort);
     
    6666    GuiInterface *guiHandler;
    6767    if(mode == "flair") {
    68       guiHandler = new GuiFlair(manager, "GuiFlair");
     68      guiHandler = new GuiFlair("GuiFlair");
    6969    } else if (mode == "gcs") {
    70       guiHandler = new GuiGcs(manager, "GuiGcs", outputAddress, outputPort);
     70      guiHandler = new GuiGcs("GuiGcs", outputAddress, outputPort);
    7171    } else {
    7272      //ERROR
Note: See TracChangeset for help on using the changeset viewer.