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

Last change on this file since 53 was 50, checked in by Sanahuja Guillaume, 7 years ago

doc

File size: 2.5 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;
32 }
[7]33}
34
35namespace flair {
36namespace meta {
[13]37class MetaUsRangeFinder;
[7]38
[13]39/*! \class Uav
40*
[44]41* \brief Base class to construct sensors/actuators depending on uav type.
42* The Object is created with
43* the FrameworkManager as parent. FrameworkManager must be created before.
44* Only one instance of this class is allowed by program.
[7]45*/
[13]46class Uav : public core::Object {
47public:
[44]48
49 Uav(std::string name,
[13]50 filter::UavMultiplex *multiplex = NULL);
51 ~Uav();
[7]52
[44]53 virtual void StartSensors(void)=0;
[13]54 void UseDefaultPlot(void);
55 actuator::Bldc *GetBldc(void) const;
56 filter::UavMultiplex *GetUavMultiplex(void) const;
57 sensor::Imu *GetImu(void) const;
58 filter::Ahrs *GetAhrs(void) const;
59 MetaUsRangeFinder *GetMetaUsRangeFinder(void) const;
60 sensor::UsRangeFinder *GetUsRangeFinder(void) const;
61 sensor::BatteryMonitor *GetBatteryMonitor(void) const;
62 sensor::Camera *GetVerticalCamera(void) const;
[44]63 sensor::Camera *GetHorizontalCamera(void) const;
64 virtual std::string GetDefaultVrpnAddress(void) const{return "127.0.0.1:3883";}
[50]65 virtual bool isReadyToFly(void) const { return true;}
66 virtual std::string GetType(void) const=0;
[7]67
[13]68protected:
69 void SetBldc(const actuator::Bldc *bldc);
70 void SetMultiplex(const filter::UavMultiplex *multiplex);
[50]71 void SetAhrs(const filter::Ahrs *ahrs);//also sets imu (retrieved from the ahrs)
[13]72 void SetUsRangeFinder(const sensor::UsRangeFinder *us);
73 void SetBatteryMonitor(const sensor::BatteryMonitor *battery);
74 void SetVerticalCamera(const sensor::Camera *verticalCamera);
[44]75 void SetHorizontalCamera(const sensor::Camera *verticalCamera);
[7]76
[13]77private:
78 sensor::Imu *imu;
79 filter::Ahrs *ahrs;
80 actuator::Bldc *bldc;
81 filter::UavMultiplex *multiplex;
82 sensor::UsRangeFinder *us;
83 MetaUsRangeFinder *meta_us;
84 sensor::BatteryMonitor *battery;
[44]85 sensor::Camera *verticalCamera,*horizontalCamera;
[13]86};
[44]87
88/*!
89* \brief get Uav
90*
91* \return the Uav
92*/
93Uav *GetUav(void);
94
[7]95} // end namespace meta
96} // end namespace flair
97#endif // HDSUAV_H
Note: See TracBrowser for help on using the repository browser.