source: flair-dev/trunk/include/FlairMeta/Uav.h@ 90

Last change on this file since 90 was 68, checked in by Sanahuja Guillaume, 6 years ago

maj for armv5te

File size: 2.9 KB
RevLine 
[9]1// %flair:license{
[13]2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
[9]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>
[50]17#include <UsRangeFinder.h>
[7]18
19namespace flair {
[44]20 namespace filter {
21 class Ahrs;
22 class UavMultiplex;
23 }
24 namespace actuator {
25 class Bldc;
26 }
27 namespace sensor {
28 class UsRangeFinder;
29 class BatteryMonitor;
30 class Imu;
31 class Camera;
[55]32 class NmeaGps;
[68]33 class PressureSensor;
[44]34 }
[7]35}
36
37namespace flair {
38namespace meta {
[13]39class MetaUsRangeFinder;
[7]40
[13]41/*! \class Uav
42*
[44]43* \brief Base class to construct sensors/actuators depending on uav type.
44* The Object is created with
45* the FrameworkManager as parent. FrameworkManager must be created before.
46* Only one instance of this class is allowed by program.
[7]47*/
[13]48class Uav : public core::Object {
49public:
[44]50
51 Uav(std::string name,
[13]52 filter::UavMultiplex *multiplex = NULL);
53 ~Uav();
[7]54
[44]55 virtual void StartSensors(void)=0;
[13]56 void UseDefaultPlot(void);
57 actuator::Bldc *GetBldc(void) const;
58 filter::UavMultiplex *GetUavMultiplex(void) const;
59 sensor::Imu *GetImu(void) const;
60 filter::Ahrs *GetAhrs(void) const;
61 MetaUsRangeFinder *GetMetaUsRangeFinder(void) const;
62 sensor::UsRangeFinder *GetUsRangeFinder(void) const;
63 sensor::BatteryMonitor *GetBatteryMonitor(void) const;
64 sensor::Camera *GetVerticalCamera(void) const;
[44]65 sensor::Camera *GetHorizontalCamera(void) const;
[55]66 sensor::NmeaGps *GetGps(void) const;
[68]67 sensor::PressureSensor *GetPressureSensor(void) const;
[44]68 virtual std::string GetDefaultVrpnAddress(void) const{return "127.0.0.1:3883";}
[50]69 virtual bool isReadyToFly(void) const { return true;}
70 virtual std::string GetType(void) const=0;
[7]71
[13]72protected:
73 void SetBldc(const actuator::Bldc *bldc);
74 void SetMultiplex(const filter::UavMultiplex *multiplex);
[50]75 void SetAhrs(const filter::Ahrs *ahrs);//also sets imu (retrieved from the ahrs)
[13]76 void SetUsRangeFinder(const sensor::UsRangeFinder *us);
77 void SetBatteryMonitor(const sensor::BatteryMonitor *battery);
78 void SetVerticalCamera(const sensor::Camera *verticalCamera);
[44]79 void SetHorizontalCamera(const sensor::Camera *verticalCamera);
[55]80 void SetGps(const sensor::NmeaGps *gps);
[68]81 void SetPressureSensor(const sensor::PressureSensor *pressureSensor);
[7]82
[13]83private:
84 sensor::Imu *imu;
[55]85 sensor::NmeaGps *gps;
[13]86 filter::Ahrs *ahrs;
87 actuator::Bldc *bldc;
88 filter::UavMultiplex *multiplex;
89 sensor::UsRangeFinder *us;
90 MetaUsRangeFinder *meta_us;
91 sensor::BatteryMonitor *battery;
[44]92 sensor::Camera *verticalCamera,*horizontalCamera;
[68]93 sensor::PressureSensor *pressureSensor;
[13]94};
[44]95
96/*!
97* \brief get Uav
98*
99* \return the Uav
100*/
101Uav *GetUav(void);
102
[7]103} // end namespace meta
104} // end namespace flair
105#endif // HDSUAV_H
Note: See TracBrowser for help on using the repository browser.