Changeset 137 in flair-src for trunk/tools


Ignore:
Timestamp:
Feb 14, 2017, 3:06:20 PM (5 years ago)
Author:
Sanahuja Guillaume
Message:

singleton manager

Location:
trunk/tools/Controller
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/Controller/DualShock3/src/DualShock3.cpp

    r16 r137  
    7979namespace sensor {
    8080
    81 DualShock3::DualShock3(const FrameworkManager *parent, string name,
     81DualShock3::DualShock3(string name,
    8282                       string receiverAddress, int receiverPort,
    8383                       ConnectionType_t _connectionType, uint32_t period,
    8484                       uint32_t bitsPerAxis, uint8_t priority)
    85     : HostEthController(parent, name, receiverAddress, receiverPort, period,
     85    : HostEthController(name, receiverAddress, receiverPort, period,
    8686                        bitsPerAxis, priority),
    8787      connectionType(_connectionType) {
  • trunk/tools/Controller/DualShock3/src/DualShock3.h

    r16 r137  
    5252  typedef enum { Usb, Bluetooth } ConnectionType_t;
    5353
    54   DualShock3(const core::FrameworkManager *parent, std::string name,
     54  DualShock3(std::string name,
    5555             std::string receiverAddress, int receiverPort,
    5656             ConnectionType_t connectionType, uint32_t period = 10,
  • trunk/tools/Controller/DualShock3/src/main.cpp

    r16 r137  
    4747  if (connection == "usb") {
    4848    //        manager->Warn("!! adresse = %s !!\n", address.c_str());
    49     joystick = new DualShock3(manager, "dualshock3", receiverAddress,
     49    joystick = new DualShock3("dualshock3", receiverAddress,
    5050                              receiverPort, DualShock3::Usb, period, 6);
    5151  } else {
    52     joystick = new DualShock3(manager, "dualshock3", receiverAddress,
     52    joystick = new DualShock3("dualshock3", receiverAddress,
    5353                              receiverPort, DualShock3::Bluetooth, period, 6);
    5454  }
  • 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.