source: flair-src/trunk/lib/FlairMeta/src/Uav.h@ 128

Last change on this file since 128 was 122, checked in by Sanahuja Guillaume, 8 years ago

modifs uav vrpn i686

File size: 2.4 KB
Line 
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}
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
18namespace 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
34namespace flair {
35namespace meta {
36class MetaUsRangeFinder;
37
38/*! \class Uav
39*
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.
44*/
45class Uav : public core::Object {
46public:
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
65protected:
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
74private:
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;
82 sensor::Camera *verticalCamera,*horizontalCamera;
83};
84
85/*!
86* \brief get Uav
87*
88* \return the Uav
89*/
90Uav *GetUav(void);
91
92} // end namespace meta
93} // end namespace flair
94#endif // HDSUAV_H
Note: See TracBrowser for help on using the repository browser.