Flair
Framework Libre Air
Uav.h
Go to the documentation of this file.
1 // %flair:license{
2 // This file is part of the Flair framework distributed under the
3 // CECILL-C License, Version 1.0.
4 // %flair:license}
13 #ifndef HDSUAV_H
14 #define HDSUAV_H
15 
16 #include <Object.h>
17 
18 namespace flair {
19  namespace filter {
20  class Ahrs;
21  class UavMultiplex;
22  }
23  namespace actuator {
24  class Bldc;
25  }
26  namespace sensor {
27  class UsRangeFinder;
28  class BatteryMonitor;
29  class Imu;
30  class Camera;
31  }
32 }
33 
34 namespace flair {
35 namespace meta {
36 class MetaUsRangeFinder;
37 
45 class Uav : public core::Object {
46 public:
47 
48  Uav(std::string name,
49  filter::UavMultiplex *multiplex = NULL);
50  ~Uav();
51 
52  virtual void StartSensors(void)=0;
53  void UseDefaultPlot(void);
54  actuator::Bldc *GetBldc(void) const;
55  filter::UavMultiplex *GetUavMultiplex(void) const;
56  sensor::Imu *GetImu(void) const;
57  filter::Ahrs *GetAhrs(void) const;
58  MetaUsRangeFinder *GetMetaUsRangeFinder(void) const;
59  sensor::UsRangeFinder *GetUsRangeFinder(void) const;
60  sensor::BatteryMonitor *GetBatteryMonitor(void) const;
61  sensor::Camera *GetVerticalCamera(void) const;
62  sensor::Camera *GetHorizontalCamera(void) const;
63  virtual std::string GetDefaultVrpnAddress(void) const{return "127.0.0.1:3883";}
64 
65 protected:
66  void SetBldc(const actuator::Bldc *bldc);
67  void SetMultiplex(const filter::UavMultiplex *multiplex);
68  void SetAhrs(const filter::Ahrs *ahrs);
69  void SetUsRangeFinder(const sensor::UsRangeFinder *us);
70  void SetBatteryMonitor(const sensor::BatteryMonitor *battery);
71  void SetVerticalCamera(const sensor::Camera *verticalCamera);
72  void SetHorizontalCamera(const sensor::Camera *verticalCamera);
73 
74 private:
75  sensor::Imu *imu;
76  filter::Ahrs *ahrs;
77  actuator::Bldc *bldc;
78  filter::UavMultiplex *multiplex;
80  MetaUsRangeFinder *meta_us;
81  sensor::BatteryMonitor *battery;
82  sensor::Camera *verticalCamera,*horizontalCamera;
83 };
84 
90 Uav *GetUav(void);
91 
92 } // end namespace meta
93 } // end namespace flair
94 #endif // HDSUAV_H
Base class for Camera.
Definition: Camera.h:39
Base class for all Framework's classes.
Definition: Object.h:77
namespace of the flair Framework
Definition: Ahrs.h:19
Base class for UsRangeFinder.
Definition: UsRangeFinder.h:40
Base class for Imu.
Definition: Imu.h:43
Abstract class for AHRS.
Definition: Ahrs.h:48
Uav * GetUav(void)
get Uav
Class defining uav multiplexing.
Definition: UavMultiplex.h:38
Classe haut niveau pour capteur à ultra son.
Definition: MetaUsRangeFinder.h:40
Base class for all Framework's classes.
Base class for battery monitor.
Definition: BatteryMonitor.h:34
Base class to construct sensors/actuators depending on uav type. The Object is created with the Frame...
Definition: Uav.h:45
Base class for brushless motors drivers.
Definition: Bldc.h:38