Changeset 137 in flair-src
- Timestamp:
- Feb 14, 2017, 3:06:20 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 92 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/demos/CircleFollower/uav/src/main.cpp
r122 r137 46 46 47 47 Uav* drone=CreateUav(name,uav_type); 48 TargetEthController *controller=new TargetEthController( manager,"Dualshock3",ds3port);48 TargetEthController *controller=new TargetEthController("Dualshock3",ds3port); 49 49 CircleFollower* demo=new CircleFollower(controller); 50 50 -
trunk/demos/Gps/uav/src/DemoGps.cpp
r122 r137 45 45 46 46 //RTDM_SerialPort *serialport=new RTDM_SerialPort(getFrameworkManager(),"gps_serial","rtser2"); 47 //gps=new Mb800( getFrameworkManager(),"gps",serialport,(NmeaGps::NMEAFlags_t)(NmeaGps::GGA|NmeaGps::VTG),40);48 gps=new SimuGps( getFrameworkManager(),"gps",(NmeaGps::NMEAFlags_t)(NmeaGps::GGA|NmeaGps::VTG),0,40);47 //gps=new Mb800("gps",serialport,(NmeaGps::NMEAFlags_t)(NmeaGps::GGA|NmeaGps::VTG),40); 48 gps=new SimuGps("gps",(NmeaGps::NMEAFlags_t)(NmeaGps::GGA|NmeaGps::VTG),0,40); 49 49 gps->UseDefaultPlot(); 50 50 getFrameworkManager()->AddDeviceToLog(gps); -
trunk/demos/Gps/uav/src/main.cpp
r122 r137 46 46 47 47 Uav* drone=CreateUav(name,uav_type); 48 TargetEthController *controller=new TargetEthController( manager,"Dualshock3",ds3port);48 TargetEthController *controller=new TargetEthController("Dualshock3",ds3port); 49 49 DemoGps* demo=new DemoGps(controller); 50 50 -
trunk/demos/OpticalFlow/uav/src/main.cpp
r123 r137 52 52 53 53 Uav* drone=CreateUav(name,uav_type); 54 TargetEthController *controller=new TargetEthController( manager,"Dualshock3",ds3port);54 TargetEthController *controller=new TargetEthController("Dualshock3",ds3port); 55 55 DemoOpticalFlow* demo=new DemoOpticalFlow(controller); 56 56 -
trunk/demos/SimpleFleet/uav/src/main.cpp
r122 r137 47 47 48 48 Uav* drone=CreateUav(name,uav_type); 49 TargetEthController *controller=new TargetEthController( manager,"Dualshock3",ds3port);49 TargetEthController *controller=new TargetEthController("Dualshock3",ds3port); 50 50 SimpleFleet* demo=new SimpleFleet(broadcast,controller); 51 51 -
trunk/demos/Skeletons/CustomReferenceAngles/src/main.cpp
r122 r137 45 45 46 46 Uav* drone=CreateUav(name,uav_type); 47 TargetEthController *controller=new TargetEthController( manager,"Dualshock3",ds3port);47 TargetEthController *controller=new TargetEthController("Dualshock3",ds3port); 48 48 MyApp* app=new MyApp(controller); 49 49 -
trunk/demos/Skeletons/CustomTorques/src/main.cpp
r122 r137 46 46 47 47 Uav* drone=CreateUav(name,uav_type); 48 TargetEthController *controller=new TargetEthController( manager,"Dualshock3",ds3port);48 TargetEthController *controller=new TargetEthController("Dualshock3",ds3port); 49 49 MyApp* app=new MyApp(controller); 50 50 -
trunk/lib/FlairCore/src/DataPlot.cpp
r15 r137 19 19 #include "DataPlot_impl.h" 20 20 #include "LayoutPosition.h" 21 #include "FrameworkManager.h"22 21 #include "IODataElement.h" 23 22 -
trunk/lib/FlairCore/src/DataPlot1D.cpp
r15 r137 19 19 #include "LayoutPosition.h" 20 20 #include "IODataElement.h" 21 #include "FrameworkManager.h"22 21 23 22 using std::string; -
trunk/lib/FlairCore/src/FrameworkManager_impl.cpp
r133 r137 204 204 void FrameworkManager_impl::SetupConnection(string address, uint16_t port,Time watchdogTimeout, 205 205 size_t rcv_buf_size) { 206 UDT::startup(); 206 if (com != NULL) { 207 Err("SetupConnection should be called only one time\n"); 208 return; 209 } 210 211 UDT::startup(); 207 212 this->rcv_buf_size = rcv_buf_size; 208 213 -
trunk/lib/FlairCore/src/Map.cpp
r67 r137 20 20 #include "Layout.h" 21 21 #include "GeoCoordinate.h" 22 #include "FrameworkManager.h"23 22 #include <cmath> 24 23 #include <string.h> -
trunk/lib/FlairCore/src/Picture.cpp
r15 r137 17 17 18 18 #include "Picture.h" 19 #include "FrameworkManager.h"20 19 #include "cvimage.h" 21 20 #include "Layout.h" -
trunk/lib/FlairCore/src/RangeFinderPlot.cpp
r15 r137 21 21 #include "Layout.h" 22 22 #include "LayoutPosition.h" 23 #include "FrameworkManager.h"24 23 #include <cxcore.h> 25 24 -
trunk/lib/FlairFilter/src/Gx3_25_ahrs.cpp
r99 r137 17 17 18 18 #include "Gx3_25_ahrs.h" 19 #include <FrameworkManager.h>20 19 #include <AhrsData.h> 21 20 #include <OneAxisRotation.h> … … 28 27 namespace filter { 29 28 30 Gx3_25_ahrs::Gx3_25_ahrs( const FrameworkManager *parent,string name,29 Gx3_25_ahrs::Gx3_25_ahrs(string name, 31 30 SerialPort *serialport, Gx3_25_imu::Command_t command, 32 31 uint8_t priority) 33 : Ahrs(new Gx3_25_imu( parent,name, serialport, command, priority), name) {}32 : Ahrs(new Gx3_25_imu( name, serialport, command, priority), name) {} 34 33 35 34 Gx3_25_ahrs::~Gx3_25_ahrs() {} -
trunk/lib/FlairFilter/src/Gx3_25_ahrs.h
r15 r137 30 30 * \brief Constructor 31 31 * 32 * Construct an Ahrs for 3dmgx3-25 32 * Construct an Ahrs for 3dmgx3-25. It will be child of the FrameworkManager. 33 33 * 34 * \param parent parent35 34 * \param name name 36 35 * \param serialport Imu SerialPort … … 38 37 * \param priority priority of the Gx3_25_imu Thread 39 38 */ 40 Gx3_25_ahrs( const core::FrameworkManager *parent,std::string name,39 Gx3_25_ahrs(std::string name, 41 40 core::SerialPort *serialport, 42 41 sensor::Gx3_25_imu::Command_t command, uint8_t priority); -
trunk/lib/FlairFilter/src/SimuAhrs.cpp
r15 r137 18 18 #include "SimuAhrs.h" 19 19 #include "SimuImu.h" 20 #include <FrameworkManager.h>21 20 #include <AhrsData.h> 22 21 … … 28 27 namespace filter { 29 28 30 SimuAhrs::SimuAhrs( const FrameworkManager *parent,string name, uint32_t dev_id,29 SimuAhrs::SimuAhrs(string name, uint32_t dev_id, 31 30 uint8_t priority) 32 : Ahrs(new SimuImu( parent,name, dev_id, priority), name) {}31 : Ahrs(new SimuImu(name, dev_id, priority), name) {} 33 32 34 33 SimuAhrs::~SimuAhrs() {} -
trunk/lib/FlairFilter/src/SimuAhrs.h
r15 r137 30 30 * \brief Constructor 31 31 * 32 * Construct a simulation Ahrs. 32 * Construct a simulation Ahrs. It will be child of the FrameworkManager. 33 33 * 34 * \param parent parent35 34 * \param name name 36 35 * \param dev_id number id of the simulated Ahrs 37 36 * \param priority priority of the SimuImu Thread 38 37 */ 39 SimuAhrs( const core::FrameworkManager *parent,std::string name,38 SimuAhrs(std::string name, 40 39 uint32_t dev_id, uint8_t priority); 41 40 -
trunk/lib/FlairFilter/src/UavMultiplex.cpp
r45 r137 39 39 namespace filter { 40 40 41 UavMultiplex::UavMultiplex(const core::FrameworkManager *parent, 42 std::string name) 43 : IODevice(parent, name) { 44 pimpl_ = new UavMultiplex_impl(parent, this, name); 41 UavMultiplex::UavMultiplex(std::string name) 42 : IODevice(getFrameworkManager(), name) { 43 pimpl_ = new UavMultiplex_impl(this, name); 45 44 } 46 45 -
trunk/lib/FlairFilter/src/UavMultiplex.h
r15 r137 19 19 namespace flair { 20 20 namespace core { 21 class FrameworkManager;22 21 class io_data; 23 22 } … … 41 40 * \brief Constructor 42 41 * 43 * Construct a uav multiplexing 44 * 45 * \param parent parent 42 * Construct a uav multiplexing. It will be child of the FrameworkManager. 43 * 46 44 * \param name name 47 45 */ 48 UavMultiplex( const core::FrameworkManager *parent,std::string name);46 UavMultiplex(std::string name); 49 47 50 48 /*! -
trunk/lib/FlairFilter/src/UavMultiplex_impl.cpp
r15 r137 33 33 using namespace flair::filter; 34 34 35 UavMultiplex_impl::UavMultiplex_impl(const FrameworkManager *parent, 36 UavMultiplex *self, std::string name) { 35 UavMultiplex_impl::UavMultiplex_impl(UavMultiplex *self, std::string name) { 37 36 input = new cvmatrix(self, 7, 1, floatType); 38 37 multiplexcombobox = NULL; … … 40 39 41 40 // station sol 42 main_tab = new Tab( parent->GetTabWidget(), name);41 main_tab = new Tab(getFrameworkManager()->GetTabWidget(), name); 43 42 tabwidget = new TabWidget(main_tab->NewRow(), "UavMultiplex"); 44 43 setup_tab = new Tab(tabwidget, "Setup"); -
trunk/lib/FlairFilter/src/X4X8Multiplex.cpp
r15 r137 26 26 namespace filter { 27 27 28 X4X8Multiplex::X4X8Multiplex(const FrameworkManager *parent, std::string name, 29 UavType_t type) 30 : UavMultiplex(parent, name) { 28 X4X8Multiplex::X4X8Multiplex(std::string name,UavType_t type) 29 : UavMultiplex( name) { 31 30 int nb_mot; 32 31 -
trunk/lib/FlairFilter/src/X4X8Multiplex.h
r15 r137 59 59 * \brief Constructor 60 60 * 61 * Construct a X4 and X8 multiplexing 61 * Construct a X4 and X8 multiplexing. It will be child of the FrameworkManager. 62 62 * 63 * \param parent parent64 63 * \param name name 65 64 * \param type type 66 65 */ 67 X4X8Multiplex(const core::FrameworkManager *parent, std::string name, 68 UavType_t type); 66 X4X8Multiplex(std::string name, UavType_t type); 69 67 70 68 /*! -
trunk/lib/FlairFilter/src/unexported/UavMultiplex_impl.h
r15 r137 45 45 * Construct a uav multiplexing 46 46 * 47 * \param parent parent47 * \param self UavMultiplex 48 48 * \param name name 49 49 */ 50 UavMultiplex_impl(const flair::core::FrameworkManager *parent, 51 flair::filter::UavMultiplex *self, std::string name); 50 UavMultiplex_impl(flair::filter::UavMultiplex *self, std::string name); 52 51 53 52 /*! -
trunk/lib/FlairMeta/src/HdsX8.cpp
r122 r137 42 42 43 43 if (multiplex == NULL) 44 SetMultiplex(new X4X8Multiplex( getFrameworkManager(),"motors", X4X8Multiplex::X8));44 SetMultiplex(new X4X8Multiplex( "motors", X4X8Multiplex::X8)); 45 45 46 46 SetBldc(new BlCtrlV2(GetUavMultiplex(), GetUavMultiplex()->GetLayout(), 47 47 "motors", GetUavMultiplex()->MotorsCount(), i2cport)); 48 SetUsRangeFinder(new Srf08( getFrameworkManager(),"SRF08", i2cport, 0x70, 60));49 SetAhrs(new Gx3_25_ahrs( getFrameworkManager(),"imu", imu_port,48 SetUsRangeFinder(new Srf08("SRF08", i2cport, 0x70, 60)); 49 SetAhrs(new Gx3_25_ahrs("imu", imu_port, 50 50 Gx3_25_imu::AccelerationAngularRateAndOrientationMatrix, 70)); 51 51 SetBatteryMonitor(((BlCtrlV2 *)GetBldc())->GetBatteryMonitor()); 52 SetVerticalCamera(new Ps3Eye( getFrameworkManager(),"camv", 0, 50));52 SetVerticalCamera(new Ps3Eye("camv", 0, 50)); 53 53 } 54 54 -
trunk/lib/FlairMeta/src/MetaDualShock3.cpp
r38 r137 36 36 namespace meta { 37 37 38 MetaDualShock3::MetaDualShock3( FrameworkManager *parent,string name,38 MetaDualShock3::MetaDualShock3(string name, 39 39 TargetController *controller) 40 40 : controller(controller),IODevice((IODevice*)controller, name) { 41 41 pimpl_ = new MetaDualShock3_impl(this, name); 42 parent->AddDeviceToLog(pimpl_->joy_ref);42 getFrameworkManager()->AddDeviceToLog(pimpl_->joy_ref); 43 43 controller->Start(); 44 44 } -
trunk/lib/FlairMeta/src/MetaDualShock3.h
r38 r137 40 40 41 41 public: 42 MetaDualShock3( core::FrameworkManager *parent,std::string name,42 MetaDualShock3(std::string name, 43 43 sensor::TargetController *controller); 44 44 ~MetaDualShock3(); -
trunk/lib/FlairMeta/src/SimuX4.cpp
r122 r137 42 42 43 43 if (multiplex == NULL) 44 SetMultiplex(new X4X8Multiplex( getFrameworkManager(),"motors", X4X8Multiplex::X4));44 SetMultiplex(new X4X8Multiplex("motors", X4X8Multiplex::X4)); 45 45 46 46 SetBldc(new SimuBldc(GetUavMultiplex(), GetUavMultiplex()->GetLayout(), 47 47 "motors", GetUavMultiplex()->MotorsCount(), simu_id)); 48 SetUsRangeFinder(new SimuUs( getFrameworkManager(),"us", simu_id, 60));49 SetAhrs(new SimuAhrs( getFrameworkManager(),"imu", simu_id, 70));48 SetUsRangeFinder(new SimuUs("us", simu_id, 60)); 49 SetAhrs(new SimuAhrs("imu", simu_id, 70)); 50 50 Tab *bat_tab = new Tab(getFrameworkManager()->GetTabWidget(), "battery"); 51 51 SetBatteryMonitor(new BatteryMonitor(bat_tab->NewRow(), "battery")); 52 52 GetBatteryMonitor()->SetBatteryValue(12); 53 53 SetVerticalCamera( 54 new SimuCamera( getFrameworkManager(),"simu_cam_v", 320, 240, 3, simu_id, 10));54 new SimuCamera("simu_cam_v", 320, 240, 3, simu_id, 10)); 55 55 } 56 56 -
trunk/lib/FlairMeta/src/SimuX8.cpp
r122 r137 42 42 43 43 if (multiplex == NULL) 44 SetMultiplex(new X4X8Multiplex( getFrameworkManager(),"motors", X4X8Multiplex::X8));44 SetMultiplex(new X4X8Multiplex("motors", X4X8Multiplex::X8)); 45 45 46 46 SetBldc(new SimuBldc(GetUavMultiplex(), GetUavMultiplex()->GetLayout(), 47 47 "motors", GetUavMultiplex()->MotorsCount(), simu_id)); 48 SetUsRangeFinder(new SimuUs( getFrameworkManager(),"us", simu_id, 60));49 SetAhrs(new SimuAhrs( getFrameworkManager(),"imu", simu_id, 70));48 SetUsRangeFinder(new SimuUs("us", simu_id, 60)); 49 SetAhrs(new SimuAhrs("imu", simu_id, 70)); 50 50 Tab *bat_tab = new Tab(getFrameworkManager()->GetTabWidget(), "battery"); 51 51 SetBatteryMonitor(new BatteryMonitor(bat_tab->NewRow(), "battery")); 52 52 GetBatteryMonitor()->SetBatteryValue(12); 53 53 SetVerticalCamera( 54 new SimuCamera( getFrameworkManager(),"simu_cam_v", 320, 240, 3, simu_id, 10));54 new SimuCamera("simu_cam_v", 320, 240, 3, simu_id, 10)); 55 55 } 56 56 -
trunk/lib/FlairMeta/src/UavStateMachine.cpp
r129 r137 90 90 uZ->AddDeviceToLog(uYaw); 91 91 92 joy=new MetaDualShock3( getFrameworkManager(),"uav high level controller",controller);92 joy=new MetaDualShock3("uav high level controller",controller); 93 93 uav->GetAhrs()->AddPlot(joy->GetReferenceOrientation(),DataPlot::Blue); 94 94 -
trunk/lib/FlairMeta/src/XAir.cpp
r122 r137 45 45 46 46 if (multiplex == NULL) 47 SetMultiplex(new X4X8Multiplex( getFrameworkManager(),"motors", X4X8Multiplex::X8));47 SetMultiplex(new X4X8Multiplex("motors", X4X8Multiplex::X8)); 48 48 49 49 SetBldc(new AfroBldc(GetUavMultiplex(), GetUavMultiplex()->GetLayout(), 50 50 "motors", GetUavMultiplex()->MotorsCount(), i2cport)); 51 SetUsRangeFinder(new Srf08( getFrameworkManager(),"SRF08", i2cport, 0x70, 60));52 SetAhrs(new Gx3_25_ahrs( getFrameworkManager(),"imu", imu_port,51 SetUsRangeFinder(new Srf08("SRF08", i2cport, 0x70, 60)); 52 SetAhrs(new Gx3_25_ahrs("imu", imu_port, 53 53 Gx3_25_imu::AccelerationAngularRateAndOrientationMatrix, 70)); 54 54 Tab *bat_tab = new Tab(getFrameworkManager()->GetTabWidget(), "battery"); 55 55 SetBatteryMonitor(new BatteryMonitor(bat_tab->NewRow(), "battery")); 56 56 GetBatteryMonitor()->SetBatteryValue(12); 57 SetVerticalCamera(new Ps3Eye( getFrameworkManager(),"camv", 0, 50));57 SetVerticalCamera(new Ps3Eye("camv", 0, 50)); 58 58 } 59 59 -
trunk/lib/FlairSensorActuator/src/AfroBldc.h
r15 r137 18 18 namespace flair { 19 19 namespace core { 20 class FrameworkManager;21 20 class I2cPort; 22 21 } -
trunk/lib/FlairSensorActuator/src/BlCtrlV2.h
r15 r137 18 18 namespace flair { 19 19 namespace core { 20 class FrameworkManager;21 20 class I2cPort; 22 21 } -
trunk/lib/FlairSensorActuator/src/BlCtrlV2_x4_speed.cpp
r15 r137 40 40 namespace flair { 41 41 namespace actuator { 42 BlCtrlV2_x4_speed::BlCtrlV2_x4_speed(FrameworkManager *parent, string name, 43 I2cPort *i2cport, uint8_t base_address, 42 BlCtrlV2_x4_speed::BlCtrlV2_x4_speed(string name,I2cPort *i2cport, uint8_t base_address, 44 43 uint8_t priority) 45 : Thread( parent, name, priority), IODevice(parent, name) {44 : Thread(getFrameworkManager(), name, priority), IODevice(getFrameworkManager(), name) { 46 45 this->i2cport = i2cport; 47 46 slave_address = base_address; … … 69 68 70 69 // station sol 71 main_tab = new Tab( parent->GetTabWidget(), name);70 main_tab = new Tab(getFrameworkManager()->GetTabWidget(), name); 72 71 tab = new TabWidget(main_tab->NewRow(), name); 73 72 Tab *sensor_tab = new Tab(tab, "Reglages"); -
trunk/lib/FlairSensorActuator/src/BlCtrlV2_x4_speed.h
r15 r137 25 25 namespace core { 26 26 class cvmatrix; 27 class FrameworkManager;28 27 class I2cPort; 29 28 } … … 44 43 45 44 public: 46 BlCtrlV2_x4_speed( core::FrameworkManager *parent,std::string name,45 BlCtrlV2_x4_speed(std::string name, 47 46 core::I2cPort *i2cport, uint8_t base_address, 48 47 uint8_t priority); -
trunk/lib/FlairSensorActuator/src/Bldc.h
r15 r137 19 19 namespace flair { 20 20 namespace core { 21 class FrameworkManager;22 21 class cvmatrix; 23 22 } -
trunk/lib/FlairSensorActuator/src/Bldc_impl.cpp
r15 r137 26 26 #include <TabWidget.h> 27 27 #include <Tab.h> 28 #include <FrameworkManager.h>29 28 #include <sstream> 30 29 -
trunk/lib/FlairSensorActuator/src/Camera.cpp
r128 r137 35 35 namespace sensor { 36 36 37 Camera::Camera( const FrameworkManager *parent,string name, uint16_t width,37 Camera::Camera(string name, uint16_t width, 38 38 uint16_t height, cvimage::Type::Format format) 39 : IODevice( parent, name) {39 : IODevice(getFrameworkManager(), name) { 40 40 plot_tab = NULL; 41 41 logFormat=LogFormat::NONE; … … 45 45 46 46 // station sol 47 main_tab = new Tab( parent->GetTabWidget(), name);47 main_tab = new Tab(getFrameworkManager()->GetTabWidget(), name); 48 48 tab = new TabWidget(main_tab->NewRow(), name); 49 49 sensor_tab = new Tab(tab, "Setup"); -
trunk/lib/FlairSensorActuator/src/Camera.h
r128 r137 43 43 * 44 44 * Construct a Camera. 45 * 46 * \param parent parent 45 * It will be child of the FrameworkManager. 46 * 47 47 * \param name name 48 48 * \param width width … … 50 50 * \param format image format 51 51 */ 52 Camera( const core::FrameworkManager *parent,std::string name, uint16_t width,52 Camera(std::string name, uint16_t width, 53 53 uint16_t height, core::cvimage::Type::Format format); 54 54 -
trunk/lib/FlairSensorActuator/src/EmulatedController.cpp
r38 r137 13 13 #include "EmulatedController.h" 14 14 #include <Controller.h> 15 #include <FrameworkManager.h>16 15 #include <TcpSocket.h> 17 16 #include <Socket.h> … … 29 28 namespace flair { namespace sensor { 30 29 31 EmulatedController::EmulatedController( const FrameworkManager* parent,string name,uint8_t priority) :32 TargetController( parent,name,priority) {30 EmulatedController::EmulatedController(string name,uint8_t priority) : 31 TargetController(name,priority) { 33 32 } 34 33 -
trunk/lib/FlairSensorActuator/src/EmulatedController.h
r38 r137 21 21 namespace flair { 22 22 namespace core { 23 class FrameworkManager;24 23 class cvmatrix; 25 24 } … … 39 38 class EmulatedController : public TargetController { 40 39 public: 41 EmulatedController( const core::FrameworkManager* parent,std::string name,uint8_t priority=0);40 EmulatedController(std::string name,uint8_t priority=0); 42 41 ~EmulatedController(); 43 42 enum class ButtonType : uint16_t { -
trunk/lib/FlairSensorActuator/src/Gx3_25_imu.cpp
r103 r137 28 28 namespace sensor { 29 29 30 Gx3_25_imu::Gx3_25_imu( const FrameworkManager *parent,string name,30 Gx3_25_imu::Gx3_25_imu(string name, 31 31 SerialPort *serialport, Command_t command, 32 32 uint8_t priority) 33 : Imu( parent, name), Thread(parent, name, priority) {33 : Imu(name), Thread(getFrameworkManager(), name, priority) { 34 34 pimpl_ = new Gx3_25_imu_impl(this, name, serialport, command, GetGroupBox()); 35 35 -
trunk/lib/FlairSensorActuator/src/Gx3_25_imu.h
r102 r137 50 50 * \brief Constructor 51 51 * 52 * Construct a Gx3_25_imu. 52 * Construct a Gx3_25_imu. It will be child of the FrameworkManager. 53 53 * 54 * \param parent parent55 54 * \param name name 56 55 * \param serialport SerialPort … … 58 57 * \param priority priority of the Thread 59 58 */ 60 Gx3_25_imu( const core::FrameworkManager *parent,std::string name,59 Gx3_25_imu(std::string name, 61 60 core::SerialPort *serialport, Command_t command, uint8_t priority); 62 61 -
trunk/lib/FlairSensorActuator/src/HokuyoUTM30Lx.cpp
r15 r137 35 35 namespace sensor { 36 36 37 HokuyoUTM30Lx::HokuyoUTM30Lx( const FrameworkManager *parent,string name,37 HokuyoUTM30Lx::HokuyoUTM30Lx(string name, 38 38 SerialPort *serialport, uint8_t priority) 39 : LaserRangeFinder( parent, name), Thread(parent, name, priority) {40 main_tab = new Tab( parent->GetTabWidget(), name);39 : LaserRangeFinder(name), Thread(getFrameworkManager(), name, priority) { 40 main_tab = new Tab(getFrameworkManager()->GetTabWidget(), name); 41 41 cvmatrix_descriptor *desc = new cvmatrix_descriptor(1081, 1); 42 42 output = new cvmatrix((IODevice *)this, desc, SignedIntegerType(16)); -
trunk/lib/FlairSensorActuator/src/HokuyoUTM30Lx.h
r15 r137 24 24 namespace core { 25 25 class cvmatrix; 26 class FrameworkManager;27 26 class SerialPort; 28 27 class Mutex; … … 47 46 * 48 47 * Construct a Hokuyo UTM30-Lx. 49 * 50 * \param parent parent48 * It will be child of the FrameworkManage 49 * 51 50 * \param name name 52 51 * \param serialport serialport 53 52 * \param priority priority of the Thread 54 53 */ 55 HokuyoUTM30Lx( const core::FrameworkManager *parent,std::string name,54 HokuyoUTM30Lx(std::string name, 56 55 core::SerialPort *serialport, uint8_t priority); 57 56 void getMesure(int startStep, int endStep, int clusterCount, int interval, -
trunk/lib/FlairSensorActuator/src/HostEthController.cpp
r15 r137 41 41 namespace sensor { 42 42 43 HostEthController::HostEthController(const FrameworkManager *parent, 44 string name, string _address, int _port, 43 HostEthController::HostEthController(string name, string _address, int _port, 45 44 uint32_t period, uint32_t _bitsPerAxis, 46 45 uint8_t priority) 47 : Thread( parent, name, priority), IODevice(parent, name),48 tab(new Tab( parent->GetTabWidget(), name)), axisNumber(0),46 : Thread(getFrameworkManager(), name, priority), IODevice(getFrameworkManager(), name), 47 tab(new Tab(getFrameworkManager()->GetTabWidget(), name)), axisNumber(0), 49 48 buttonNumber(0), targetAddress(_address), targetPort(_port), 50 49 bitsPerAxis(_bitsPerAxis), dataFrameBuffer(NULL), -
trunk/lib/FlairSensorActuator/src/HostEthController.h
r15 r137 26 26 namespace flair { 27 27 namespace core { 28 class FrameworkManager;29 28 class cvmatrix; 30 29 class TcpSocket; … … 56 55 class HostEthController : public core::Thread, public core::IODevice { 57 56 public: 58 HostEthController( const core::FrameworkManager *parent,std::string name,57 HostEthController(std::string name, 59 58 std::string address, int port, uint32_t period = 10, 60 59 uint32_t _bitsPerAxis = 7, uint8_t priority = 0); -
trunk/lib/FlairSensorActuator/src/Imu.cpp
r99 r137 33 33 namespace sensor { 34 34 35 Imu::Imu( const FrameworkManager *parent, string name) : IODevice(parent, name) {35 Imu::Imu(string name) : IODevice(getFrameworkManager(), name) { 36 36 imuData = new ImuData(this); 37 37 38 38 // station sol 39 mainTab = new Tab( parent->GetTabWidget(), name);39 mainTab = new Tab(getFrameworkManager()->GetTabWidget(), name); 40 40 tab = new TabWidget(mainTab->NewRow(), name); 41 41 sensorTab = new Tab(tab, "Reglages"); … … 44 44 } 45 45 46 Imu::Imu(const IODevice *parent, 46 Imu::Imu(const IODevice *parent,std::string name) : IODevice(parent, name) { 47 47 imuData = new ImuData(this); 48 48 mainTab = NULL; -
trunk/lib/FlairSensorActuator/src/Imu.h
r99 r137 49 49 * 50 50 * Construct an Imu. 51 * It will be child of the FrameworkManager. 51 52 * 52 * \param parent parent53 53 * \param name name 54 54 */ 55 Imu( const core::FrameworkManager *parent,std::string name);55 Imu(std::string name); 56 56 57 57 /*! -
trunk/lib/FlairSensorActuator/src/LaserRangeFinder.cpp
r15 r137 35 35 namespace sensor { 36 36 37 LaserRangeFinder::LaserRangeFinder( const FrameworkManager *parent,string name)38 : IODevice( parent, name) {37 LaserRangeFinder::LaserRangeFinder(string name) 38 : IODevice(getFrameworkManager(), name) { 39 39 cvmatrix_descriptor *desc = new cvmatrix_descriptor(360, 1); 40 40 output = new cvmatrix(this, desc, floatType); … … 42 42 43 43 // station sol 44 main_tab = new Tab( parent->GetTabWidget(), name);44 main_tab = new Tab(getFrameworkManager()->GetTabWidget(), name); 45 45 tab = new TabWidget(main_tab->NewRow(), name); 46 46 sensor_tab = new Tab(tab, "Reglages"); -
trunk/lib/FlairSensorActuator/src/LaserRangeFinder.h
r15 r137 42 42 * 43 43 * Construct a Laser Range Finder. 44 * It will be child of the FrameworkManager 44 45 * 45 * \param parent parent46 46 * \param name name 47 47 */ 48 LaserRangeFinder( const core::FrameworkManager *parent,std::string name);48 LaserRangeFinder(std::string name); 49 49 /*! 50 50 * \brief Constructor -
trunk/lib/FlairSensorActuator/src/Mb800.cpp
r51 r137 27 27 namespace sensor { 28 28 29 Mb800::Mb800( const FrameworkManager *parent,string name,29 Mb800::Mb800(string name, 30 30 SerialPort *serialport, NmeaGps::NMEAFlags_t NMEAFlags, 31 31 uint8_t priority) 32 : NmeaGps( parent, name, NMEAFlags), Thread(parent, name, priority) {32 : NmeaGps(name, NMEAFlags), Thread(getFrameworkManager(), name, priority) { 33 33 this->serialport = serialport; 34 34 serialport->SetRxTimeout(100000000); -
trunk/lib/FlairSensorActuator/src/Mb800.h
r51 r137 19 19 namespace flair { 20 20 namespace core { 21 class FrameworkManager;22 21 class SerialPort; 23 22 } … … 36 35 * 37 36 * Construct a Mb800. 38 * 39 * \param parent parent 37 * It will be child of the FrameworkManager. 38 * 40 39 * \param name name 41 40 * \param serialport serialport … … 43 42 * \param priority priority of the Thread 44 43 */ 45 Mb800( const core::FrameworkManager *parent,std::string name,44 Mb800(std::string name, 46 45 core::SerialPort *serialport, NmeaGps::NMEAFlags_t NMEAFlags, 47 46 uint8_t priority); -
trunk/lib/FlairSensorActuator/src/NmeaGps.cpp
r68 r137 41 41 namespace sensor { 42 42 43 NmeaGps::NmeaGps( const FrameworkManager *parent,string name, NMEAFlags_t NMEAFlags)44 : IODevice( parent, name) {43 NmeaGps::NmeaGps(string name, NMEAFlags_t NMEAFlags) 44 : IODevice(getFrameworkManager(), name) { 45 45 this->NMEAFlags = NMEAFlags; 46 46 … … 54 54 55 55 // station sol 56 mainTab = new Tab( parent->GetTabWidget(), name);56 mainTab = new Tab(getFrameworkManager()->GetTabWidget(), name); 57 57 tab = new TabWidget(mainTab->NewRow(), name); 58 58 sensorTab = new Tab(tab, "Setup"); -
trunk/lib/FlairSensorActuator/src/NmeaGps.h
r55 r137 59 59 * 60 60 * Construct a NmeaGps. 61 * 62 * \param parent parent 61 * It will be child of the FrameworkManager. 62 * 63 63 * \param name name 64 64 * \param NMEAFlags NMEA sentances to enable 65 65 */ 66 NmeaGps( const core::FrameworkManager *parent,std::string name,66 NmeaGps(std::string name, 67 67 NMEAFlags_t NMEAFlags); 68 68 -
trunk/lib/FlairSensorActuator/src/Novatel.cpp
r51 r137 27 27 namespace sensor { 28 28 29 Novatel::Novatel( const FrameworkManager *parent,string name,29 Novatel::Novatel(string name, 30 30 SerialPort *serialport, NmeaGps::NMEAFlags_t NMEAFlags, 31 31 uint8_t priority) 32 : NmeaGps( parent, name, NMEAFlags), Thread(parent, name, priority) {32 : NmeaGps(name, NMEAFlags), Thread(getFrameworkManager(), name, priority) { 33 33 this->serialport = serialport; 34 34 } -
trunk/lib/FlairSensorActuator/src/Novatel.h
r51 r137 36 36 * 37 37 * Construct a Novatel. 38 * It will be child of the FrameworkManager. 38 39 * 39 * \param parent parent40 40 * \param name name 41 41 * \param serialport serialport … … 43 43 * \param priority priority of the Thread 44 44 */ 45 Novatel( const core::FrameworkManager *parent,std::string name,45 Novatel(std::string name, 46 46 core::SerialPort *serialport, NmeaGps::NMEAFlags_t NMEAFlags, 47 47 uint8_t priority); -
trunk/lib/FlairSensorActuator/src/Ps3Eye.cpp
r15 r137 17 17 18 18 #include "Ps3Eye.h" 19 #include <GroupBox.h>20 #include <DoubleSpinBox.h>21 #include <CheckBox.h>22 #include <GridLayout.h>23 #include <cvimage.h>24 #include <FrameworkManager.h>25 #include <stdio.h>26 19 27 20 using std::string; 28 21 using namespace flair::core; 29 using namespace flair::gui;30 22 31 23 namespace flair { 32 24 namespace sensor { 33 25 34 Ps3Eye::Ps3Eye( const FrameworkManager *parent,string name, int camera_index,26 Ps3Eye::Ps3Eye(string name, int camera_index, 35 27 uint8_t priority) 36 : V4LCamera( parent,name, camera_index, 320, 240,28 : V4LCamera( name, camera_index, 320, 240, 37 29 cvimage::Type::Format::YUYV, priority) {} 38 30 -
trunk/lib/FlairSensorActuator/src/Ps3Eye.h
r15 r137 17 17 18 18 namespace flair { 19 namespace core {20 class cvimage;21 class FrameworkManager;22 }23 namespace gui {24 class GridLayout;25 class DoubleSpinBox;26 class CheckBox;27 }28 }29 30 namespace flair {31 19 namespace sensor { 32 20 /*! \class Ps3Eye … … 41 29 * 42 30 * Construct a Ps3Eye. 31 * It will be child of the FrameworkManager. 43 32 * 44 * \param parent parent45 33 * \param name name 46 34 * \param camera_index index of the camera, ie /dev/videox 47 35 * \param priority priority of the Thread 48 36 */ 49 Ps3Eye( const core::FrameworkManager *parent,std::string name,37 Ps3Eye(std::string name, 50 38 int camera_index, uint8_t priority); 51 39 -
trunk/lib/FlairSensorActuator/src/RadioReceiver.cpp
r15 r137 31 31 namespace sensor { 32 32 33 RadioReceiver::RadioReceiver( const FrameworkManager *parent,string name,33 RadioReceiver::RadioReceiver(string name, 34 34 unsigned int nb_channels) 35 : IODevice( parent, name) {35 : IODevice(getFrameworkManager(), name) { 36 36 is_connected = false; 37 37 this->nb_channels = nb_channels; … … 47 47 48 48 // station sol 49 main_tab = new Tab( parent->GetTabWidget(), name);49 main_tab = new Tab(getFrameworkManager()->GetTabWidget(), name); 50 50 tab = new TabWidget(main_tab->NewRow(), name); 51 51 setup_tab = new Tab(tab, "Setup"); -
trunk/lib/FlairSensorActuator/src/RadioReceiver.h
r15 r137 19 19 namespace flair { 20 20 namespace core { 21 class FrameworkManager;22 21 class cvmatrix; 23 22 } … … 41 40 * 42 41 * Construct a RadioReceiver. 42 * It will be child of the FrameworkManager. 43 43 * 44 * \param parent parent45 44 * \param name name 46 45 * \param nb_channels number of supported channels 47 46 */ 48 RadioReceiver( const core::FrameworkManager *parent,std::string name,47 RadioReceiver(std::string name, 49 48 unsigned int nb_channels); 50 49 -
trunk/lib/FlairSensorActuator/src/SimuCamera.cpp
r15 r137 18 18 #include "SimuCamera.h" 19 19 #include <FrameworkManager.h> 20 #include <GroupBox.h> 20 21 #include <SpinBox.h> 21 #include <GroupBox.h> 22 #include <cvimage.h> 22 //#include <cvimage.h> 23 23 #include <SharedMem.h> 24 24 #include <sstream> … … 32 32 namespace sensor { 33 33 34 SimuCamera::SimuCamera( const FrameworkManager *parent,string name,34 SimuCamera::SimuCamera(string name, 35 35 uint16_t width, uint16_t height, uint8_t channels, 36 36 uint32_t dev_id, uint8_t priority) 37 : Thread( parent, name, priority),38 Camera( parent,name, width, height, cvimage::Type::Format::BGR) {37 : Thread(getFrameworkManager(), name, priority), 38 Camera(name, width, height, cvimage::Type::Format::BGR) { 39 39 data_rate = 40 40 new SpinBox(GetGroupBox()->NewRow(), "data rate", " Hz", 1, 100, 1, 50); … … 52 52 SimuCamera::SimuCamera(const IODevice *parent, string name, uint16_t width, 53 53 uint16_t height, uint8_t channels, uint32_t dev_id) 54 : Thread(parent, name, 0), Camera(parent, 54 : Thread(parent, name, 0), Camera(parent,name) { 55 55 data_rate = NULL; 56 56 -
trunk/lib/FlairSensorActuator/src/SimuCamera.h
r15 r137 39 39 * 40 40 * Construct a SimuCamera. Control part. 41 * It will be child of the FrameworkManager. 41 42 * 42 * \param parent parent43 43 * \param name name 44 44 * \param width width … … 48 48 * \param priority priority of the Thread 49 49 */ 50 SimuCamera( const core::FrameworkManager *parent,std::string name,50 SimuCamera(std::string name, 51 51 uint16_t width, uint16_t height, uint8_t channels, uint32_t dev_id, 52 52 uint8_t priority); -
trunk/lib/FlairSensorActuator/src/SimuGps.cpp
r68 r137 38 38 namespace sensor { 39 39 40 SimuGps::SimuGps( const FrameworkManager *parent,string name,40 SimuGps::SimuGps(string name, 41 41 NmeaGps::NMEAFlags_t NMEAFlags, uint32_t deviceId,uint8_t priority) 42 : NmeaGps( parent, name, NMEAFlags),Thread(parent, name, priority) {42 : NmeaGps(name, NMEAFlags),Thread(getFrameworkManager(), name, priority) { 43 43 44 44 dataRate = new SpinBox(GetGroupBox()->NewRow(), "data rate", " Hz", 1, 500, 1, 200); -
trunk/lib/FlairSensorActuator/src/SimuGps.h
r68 r137 19 19 namespace flair { 20 20 namespace core { 21 class FrameworkManager;22 21 class SharedMem; 23 22 } … … 40 39 * 41 40 * Construct a simulation GPS. Control part. 42 * 43 * \param parent parent 41 * It will be child of the FrameworkManager. 42 * 44 43 * \param name name 45 44 * \param NMEAFlags NMEA sentances to enable … … 47 46 * \param priority priority of the Thread 48 47 */ 49 SimuGps( const core::FrameworkManager *parent,std::string name,48 SimuGps(std::string name, 50 49 NmeaGps::NMEAFlags_t NMEAFlags, uint32_t deviceId,uint8_t priority); 51 50 -
trunk/lib/FlairSensorActuator/src/SimuImu.cpp
r55 r137 34 34 namespace sensor { 35 35 36 SimuImu::SimuImu( const FrameworkManager *parent,string name, uint32_t dev_id,36 SimuImu::SimuImu(string name, uint32_t dev_id, 37 37 uint8_t priority) 38 : Imu( parent, name), Thread(parent, name, priority) {38 : Imu(name), Thread(getFrameworkManager(), name, priority) { 39 39 dataRate = 40 40 new SpinBox(GetGroupBox()->NewRow(), "data rate", " Hz", 1, 500, 1, 200); … … 48 48 49 49 SimuImu::SimuImu(const IODevice *parent, string name, uint32_t dev_id) 50 : Imu(parent, 50 : Imu(parent,name), Thread(parent, name, 0) { 51 51 dataRate = NULL; 52 52 -
trunk/lib/FlairSensorActuator/src/SimuImu.h
r55 r137 39 39 * 40 40 * Construct a SimuImu. Control part. 41 * It will be child of the FrameworkManager. 41 42 * 42 * \param parent parent43 43 * \param name name 44 44 * \param dev_id device id 45 45 * \param priority priority of the Thread 46 46 */ 47 SimuImu( const core::FrameworkManager *parent,std::string name,47 SimuImu(std::string name, 48 48 uint32_t dev_id, uint8_t priority); 49 49 -
trunk/lib/FlairSensorActuator/src/SimuLaser.cpp
r15 r137 32 32 namespace sensor { 33 33 34 SimuLaser::SimuLaser( const FrameworkManager *parent,string name,34 SimuLaser::SimuLaser(string name, 35 35 uint32_t dev_id, uint8_t priority) 36 : Thread( parent, name, priority), LaserRangeFinder(parent,name) {36 : Thread(getFrameworkManager(), name, priority), LaserRangeFinder(name) { 37 37 data_rate = 38 38 new SpinBox(GetGroupBox()->NewRow(), "data rate", " Hz", 1, 500, 1, 50); -
trunk/lib/FlairSensorActuator/src/SimuLaser.h
r15 r137 38 38 * 39 39 * Construct a SimuUs. Control part. 40 * It will be child of the FrameworkManager. 40 41 * 41 * \param parent parent42 42 * \param name name 43 43 * \param dev_id device id 44 44 * \param priority priority of the Thread 45 45 */ 46 SimuLaser( const core::FrameworkManager *parent,std::string name,46 SimuLaser(std::string name, 47 47 uint32_t dev_id, uint8_t priority); 48 48 -
trunk/lib/FlairSensorActuator/src/SimuUs.cpp
r15 r137 32 32 namespace sensor { 33 33 34 SimuUs::SimuUs( const FrameworkManager *parent,string name, uint32_t dev_id,34 SimuUs::SimuUs(string name, uint32_t dev_id, 35 35 uint8_t priority) 36 : Thread( parent, name, priority), UsRangeFinder(parent,name) {36 : Thread(getFrameworkManager(), name, priority), UsRangeFinder( name) { 37 37 data_rate = 38 38 new SpinBox(GetGroupBox()->NewRow(), "data rate", " Hz", 1, 500, 1, 50); … … 44 44 45 45 SimuUs::SimuUs(const IODevice *parent, string name, uint32_t dev_id) 46 : Thread(parent, name, 0), UsRangeFinder(parent, 46 : Thread(parent, name, 0), UsRangeFinder(parent,name) { 47 47 data_rate = NULL; 48 48 -
trunk/lib/FlairSensorActuator/src/SimuUs.h
r15 r137 38 38 * 39 39 * Construct a SimuUs. Control part. 40 * It will be child of the FrameworkManager. 40 41 * 41 * \param parent parent42 42 * \param name name 43 43 * \param dev_id device id 44 44 * \param priority priority of the Thread 45 45 */ 46 SimuUs( const core::FrameworkManager *parent,std::string name,46 SimuUs(std::string name, 47 47 uint32_t dev_id, uint8_t priority); 48 48 -
trunk/lib/FlairSensorActuator/src/Srf08.cpp
r51 r137 33 33 namespace sensor { 34 34 35 Srf08::Srf08( const FrameworkManager *parent,string name, I2cPort *i2cport,35 Srf08::Srf08(string name, I2cPort *i2cport, 36 36 uint16_t address, uint8_t priority) 37 : Thread( parent, name, priority), UsRangeFinder(parent,name) {37 : Thread(getFrameworkManager(), name, priority), UsRangeFinder(name) { 38 38 is_init = false; 39 39 -
trunk/lib/FlairSensorActuator/src/Srf08.h
r51 r137 19 19 namespace flair { 20 20 namespace core { 21 class FrameworkManager;22 21 class I2cPort; 23 22 } 24 23 namespace gui { 25 24 class SpinBox; 26 ;27 25 } 28 26 } … … 41 39 * 42 40 * Construct a SRF08 sensor 41 * It will be child of the FrameworkManager. 43 42 * 44 * \param parent parent45 43 * \param name name 46 44 * \param i2cport i2c port … … 48 46 * \param priority priority of the Thread 49 47 */ 50 Srf08( const core::FrameworkManager *parent,std::string name,48 Srf08(std::string name, 51 49 core::I2cPort *i2cport, uint16_t address, uint8_t priority); 52 50 -
trunk/lib/FlairSensorActuator/src/TargetController.cpp
r42 r137 34 34 namespace sensor { 35 35 36 TargetController::TargetController( const FrameworkManager* parent,string name,uint8_t priority) :37 Thread( parent,name,priority),IODevice(parent,name) {36 TargetController::TargetController(string name,uint8_t priority) : 37 Thread(getFrameworkManager(),name,priority),IODevice(getFrameworkManager(),name) { 38 38 main_tab=new Tab(getFrameworkManager()->GetTabWidget(),name); 39 39 TabWidget* tab=new TabWidget(main_tab->NewRow(),name); -
trunk/lib/FlairSensorActuator/src/TargetController.h
r15 r137 49 49 class TargetController : public core::Thread, public core::IODevice { 50 50 public: 51 TargetController(const core::FrameworkManager *parent, std::string name, 52 uint8_t priority = 0); 51 TargetController(std::string name,uint8_t priority = 0); 53 52 ~TargetController(); 54 53 // void DrawUserInterface(); -
trunk/lib/FlairSensorActuator/src/TargetEthController.cpp
r38 r137 36 36 namespace sensor { 37 37 38 TargetEthController::TargetEthController(const FrameworkManager *parent, 39 string name, uint16_t _port, 38 TargetEthController::TargetEthController(string name, uint16_t _port, 40 39 uint8_t priority) 41 : TargetController( parent,name, priority), listeningPort(_port),40 : TargetController(name, priority), listeningPort(_port), 42 41 receiveCurrentPosition(0) { 43 42 const bool blocking = true; 44 43 listeningSocket = 45 new TcpSocket( parent, "TEC_listening_socket", blocking, blocking);44 new TcpSocket(getFrameworkManager(), "TEC_listening_socket", blocking, blocking); 46 45 dataSocket = 47 new Socket( parent, "TEC_data_socket", _port + 1); // receiving side46 new Socket(getFrameworkManager(), "TEC_data_socket", _port + 1); // receiving side 48 47 } 49 48 -
trunk/lib/FlairSensorActuator/src/TargetEthController.h
r16 r137 47 47 class TargetEthController : public TargetController { 48 48 public: 49 TargetEthController( const core::FrameworkManager *parent,std::string name,49 TargetEthController(std::string name, 50 50 uint16_t port, uint8_t priority = 0); 51 51 ~TargetEthController(); -
trunk/lib/FlairSensorActuator/src/UsRangeFinder.cpp
r15 r137 32 32 namespace sensor { 33 33 34 UsRangeFinder::UsRangeFinder( const FrameworkManager *parent,string name)35 : IODevice( parent, name) {34 UsRangeFinder::UsRangeFinder(string name) 35 : IODevice(getFrameworkManager(), name) { 36 36 plot_tab = NULL; 37 37 … … 42 42 43 43 // station sol 44 main_tab = new Tab( parent->GetTabWidget(), name);44 main_tab = new Tab(getFrameworkManager()->GetTabWidget(), name); 45 45 tab = new TabWidget(main_tab->NewRow(), name); 46 46 sensor_tab = new Tab(tab, "Reglages"); -
trunk/lib/FlairSensorActuator/src/UsRangeFinder.h
r15 r137 44 44 * 45 45 * Construct a UsRangeFinder. Control part. 46 * 47 * \param parent parent 46 * It will be child of the FrameworkManager. 47 * 48 48 * \param name name 49 49 */ 50 UsRangeFinder( const core::FrameworkManager *parent,std::string name);50 UsRangeFinder(std::string name); 51 51 52 52 /*! -
trunk/lib/FlairSensorActuator/src/V4LCamera.cpp
r124 r137 20 20 #include <DoubleSpinBox.h> 21 21 #include <CheckBox.h> 22 #include <GridLayout.h>23 22 #include <Label.h> 24 23 #include <cvimage.h> … … 33 32 namespace sensor { 34 33 35 V4LCamera::V4LCamera( const FrameworkManager *parent,string name,34 V4LCamera::V4LCamera(string name, 36 35 uint8_t camera_index, uint16_t width, uint16_t height, 37 36 cvimage::Type::Format format, uint8_t priority) 38 : Thread( parent, name, priority),39 Camera( parent,name, width, height, format) {37 : Thread(getFrameworkManager(), name, priority), 38 Camera(name, width, height, format) { 40 39 capture = cvCaptureFromCAM(camera_index); // a mettre apres l'init dsp 41 40 -
trunk/lib/FlairSensorActuator/src/V4LCamera.h
r15 r137 21 21 namespace core { 22 22 class cvimage; 23 class FrameworkManager;24 23 } 25 24 namespace gui { 26 class GridLayout;27 25 class DoubleSpinBox; 28 26 class CheckBox; … … 43 41 * 44 42 * Construct a Camera. 43 * It will be child of the FrameworkManager. 45 44 * 46 * \param parent parent47 45 * \param name name 48 46 * \param camera_index camera index … … 52 50 * \param priority priority of the Thread 53 51 */ 54 V4LCamera( const core::FrameworkManager *parent,std::string name,52 V4LCamera(std::string name, 55 53 uint8_t camera_index, uint16_t width, uint16_t height, 56 54 core::cvimage::Type::Format format, uint8_t priority); -
trunk/tools/Controller/DualShock3/src/DualShock3.cpp
r16 r137 79 79 namespace sensor { 80 80 81 DualShock3::DualShock3( const FrameworkManager *parent,string name,81 DualShock3::DualShock3(string name, 82 82 string receiverAddress, int receiverPort, 83 83 ConnectionType_t _connectionType, uint32_t period, 84 84 uint32_t bitsPerAxis, uint8_t priority) 85 : HostEthController( parent,name, receiverAddress, receiverPort, period,85 : HostEthController(name, receiverAddress, receiverPort, period, 86 86 bitsPerAxis, priority), 87 87 connectionType(_connectionType) { -
trunk/tools/Controller/DualShock3/src/DualShock3.h
r16 r137 52 52 typedef enum { Usb, Bluetooth } ConnectionType_t; 53 53 54 DualShock3( const core::FrameworkManager *parent,std::string name,54 DualShock3(std::string name, 55 55 std::string receiverAddress, int receiverPort, 56 56 ConnectionType_t connectionType, uint32_t period = 10, -
trunk/tools/Controller/DualShock3/src/main.cpp
r16 r137 47 47 if (connection == "usb") { 48 48 // manager->Warn("!! adresse = %s !!\n", address.c_str()); 49 joystick = new DualShock3( manager,"dualshock3", receiverAddress,49 joystick = new DualShock3("dualshock3", receiverAddress, 50 50 receiverPort, DualShock3::Usb, period, 6); 51 51 } else { 52 joystick = new DualShock3( manager,"dualshock3", receiverAddress,52 joystick = new DualShock3("dualshock3", receiverAddress, 53 53 receiverPort, DualShock3::Bluetooth, period, 6); 54 54 } -
trunk/tools/Controller/Mavlink/src/Forwarder.cpp
r88 r137 28 28 using namespace flair::core; 29 29 30 Forwarder::Forwarder( const FrameworkManager *parent,string name, string &inputAddress,30 Forwarder::Forwarder(string name, string &inputAddress, 31 31 int inputPort, string &outputAddress, int outputPort): 32 Thread( parent, name, 6), inputAddress(inputAddress),32 Thread(getFrameworkManager(), name, 6), inputAddress(inputAddress), 33 33 inputPort(inputPort), outputAddress(outputAddress), 34 34 outputPort(outputPort) { -
trunk/tools/Controller/Mavlink/src/Forwarder.h
r88 r137 25 25 namespace flair { 26 26 namespace core { 27 class FrameworkManager;28 27 class Socket; 29 28 } … … 33 32 public: 34 33 35 Forwarder( const flair::core::FrameworkManager *parent,std::string name,34 Forwarder(std::string name, 36 35 std::string &inputAddress, int inputPort, 37 36 std::string &outputAddress, int outputPort); -
trunk/tools/Controller/Mavlink/src/GuiFlair.cpp
r88 r137 20 20 #include "GuiInterface.h" 21 21 22 #include <FrameworkManager.h>23 22 #include <Socket.h> 24 23 … … 31 30 using namespace flair::gui; 32 31 33 GuiFlair::GuiFlair( const FrameworkManager *parent,string name):34 GuiInterface( parent,name) {32 GuiFlair::GuiFlair(string name): 33 GuiInterface(name) { 35 34 cout << "MavPlanner GuiFlair constructor" << endl; 36 35 -
trunk/tools/Controller/Mavlink/src/GuiFlair.h
r88 r137 26 26 namespace flair { 27 27 namespace core { 28 class FrameworkManager;29 28 class Socket; 30 29 } … … 34 33 public: 35 34 36 GuiFlair( const flair::core::FrameworkManager *parent,std::string name);35 GuiFlair(std::string name); 37 36 ~GuiFlair(); 38 37 -
trunk/tools/Controller/Mavlink/src/GuiGcs.cpp
r88 r137 21 21 22 22 #include <Socket.h> 23 #include <FrameworkManager.h>24 23 25 24 #include "MavlinkUDP.h" … … 36 35 const std::string delimiter = "|"; 37 36 38 GuiGcs::GuiGcs( const FrameworkManager *parent,string name,37 GuiGcs::GuiGcs(string name, 39 38 std::string &outputAddress, int outputPort): 40 GuiInterface( parent,name) {39 GuiInterface(name) { 41 40 cout << "MavPlanner GuiGcs constructor" << endl; 42 41 //outputSocket = new Socket((Thread *)this, "output socket", outputAddress + ":" + to_string(outputPort)); -
trunk/tools/Controller/Mavlink/src/GuiGcs.h
r88 r137 32 32 namespace flair { 33 33 namespace core { 34 class FrameworkManager;35 34 class Socket; 36 35 } … … 40 39 public: 41 40 42 GuiGcs( const flair::core::FrameworkManager *parent,std::string name,41 GuiGcs(std::string name, 43 42 std::string &outputAddress, int outputPort); 44 43 ~GuiGcs(); -
trunk/tools/Controller/Mavlink/src/GuiInterface.cpp
r88 r137 39 39 using namespace std; 40 40 41 GuiInterface::GuiInterface( const FrameworkManager *parent,string name)42 : Thread( parent, name, 6),43 mainTab(new Tab( parent->GetTabWidget(), name)) {41 GuiInterface::GuiInterface(string name) 42 : Thread(getFrameworkManager(), name, 6), 43 mainTab(new Tab(getFrameworkManager()->GetTabWidget(), name)) { 44 44 45 45 tabWidget = new TabWidget(mainTab->NewRow(), name); -
trunk/tools/Controller/Mavlink/src/GuiInterface.h
r88 r137 24 24 namespace flair { 25 25 namespace core { 26 class FrameworkManager;27 26 class Socket; 28 27 } … … 42 41 public: 43 42 44 GuiInterface( const flair::core::FrameworkManager *parent,std::string name);43 GuiInterface(std::string name); 45 44 ~GuiInterface(); 46 45 -
trunk/tools/Controller/Mavlink/src/main.cpp
r88 r137 56 56 57 57 if(mode == "forward") { 58 Forwarder *guiForwarder = new Forwarder( manager,"Forwarder",58 Forwarder *guiForwarder = new Forwarder("Forwarder", 59 59 inputAddress, inputPort, 60 60 outputAddress, outputPort); … … 66 66 GuiInterface *guiHandler; 67 67 if(mode == "flair") { 68 guiHandler = new GuiFlair( manager,"GuiFlair");68 guiHandler = new GuiFlair("GuiFlair"); 69 69 } else if (mode == "gcs") { 70 guiHandler = new GuiGcs( manager,"GuiGcs", outputAddress, outputPort);70 guiHandler = new GuiGcs("GuiGcs", outputAddress, outputPort); 71 71 } else { 72 72 //ERROR
Note:
See TracChangeset
for help on using the changeset viewer.