[10] | 1 | // %flair:license{
|
---|
[15] | 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
[10] | 4 | // %flair:license}
|
---|
[7] | 5 | /*!
|
---|
| 6 | * \file Uav.h
|
---|
| 7 | * \brief Base class to construct sensors/actuators depending on uav type
|
---|
| 8 | * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
| 9 | * \date 2014/01/22
|
---|
| 10 | * \version 3.4
|
---|
| 11 | */
|
---|
| 12 |
|
---|
| 13 | #ifndef HDSUAV_H
|
---|
| 14 | #define HDSUAV_H
|
---|
| 15 |
|
---|
| 16 | #include <Object.h>
|
---|
| 17 |
|
---|
| 18 | namespace flair {
|
---|
[122] | 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 | }
|
---|
[7] | 32 | }
|
---|
| 33 |
|
---|
| 34 | namespace flair {
|
---|
| 35 | namespace meta {
|
---|
[15] | 36 | class MetaUsRangeFinder;
|
---|
[7] | 37 |
|
---|
[15] | 38 | /*! \class Uav
|
---|
| 39 | *
|
---|
[122] | 40 | * \brief Base class to construct sensors/actuators depending on uav type.
|
---|
| 41 | * The Object is created with
|
---|
| 42 | * the FrameworkManager as parent. FrameworkManager must be created before.
|
---|
| 43 | * Only one instance of this class is allowed by program.
|
---|
[7] | 44 | */
|
---|
[15] | 45 | class Uav : public core::Object {
|
---|
| 46 | public:
|
---|
[122] | 47 |
|
---|
| 48 | Uav(std::string name,
|
---|
[15] | 49 | filter::UavMultiplex *multiplex = NULL);
|
---|
| 50 | ~Uav();
|
---|
[7] | 51 |
|
---|
[122] | 52 | virtual void StartSensors(void)=0;
|
---|
[15] | 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;
|
---|
[121] | 62 | sensor::Camera *GetHorizontalCamera(void) const;
|
---|
[122] | 63 | virtual std::string GetDefaultVrpnAddress(void) const{return "127.0.0.1:3883";}
|
---|
[7] | 64 |
|
---|
[15] | 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);
|
---|
[121] | 72 | void SetHorizontalCamera(const sensor::Camera *verticalCamera);
|
---|
[7] | 73 |
|
---|
[15] | 74 | private:
|
---|
| 75 | sensor::Imu *imu;
|
---|
| 76 | filter::Ahrs *ahrs;
|
---|
| 77 | actuator::Bldc *bldc;
|
---|
| 78 | filter::UavMultiplex *multiplex;
|
---|
| 79 | sensor::UsRangeFinder *us;
|
---|
| 80 | MetaUsRangeFinder *meta_us;
|
---|
| 81 | sensor::BatteryMonitor *battery;
|
---|
[121] | 82 | sensor::Camera *verticalCamera,*horizontalCamera;
|
---|
[15] | 83 | };
|
---|
[122] | 84 |
|
---|
| 85 | /*!
|
---|
| 86 | * \brief get Uav
|
---|
| 87 | *
|
---|
| 88 | * \return the Uav
|
---|
| 89 | */
|
---|
| 90 | Uav *GetUav(void);
|
---|
| 91 |
|
---|
[7] | 92 | } // end namespace meta
|
---|
| 93 | } // end namespace flair
|
---|
| 94 | #endif // HDSUAV_H
|
---|