Flair
Framework Libre Air
UavMultiplex.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 UAVMULTIPLEX_H
14 #define UAVMULTIPLEX_H
15 
16 #include <IODevice.h>
17 #include <stdint.h>
18 
19 namespace flair {
20 namespace core {
21 class FrameworkManager;
22 class io_data;
23 }
24 namespace gui {
25 class TabWidget;
26 class Layout;
27 }
28 }
29 
30 class UavMultiplex_impl;
31 
32 namespace flair {
33 namespace filter {
38 class UavMultiplex : public core::IODevice {
39 public:
48  UavMultiplex(const core::FrameworkManager *parent, std::string name);
49 
54  ~UavMultiplex();
55 
63  void SetRoll(float value);
64 
72  void SetPitch(float value);
73 
81  void SetYaw(float value);
82 
90  void SetThrust(float value);
91 
99  void SetRollTrim(float value);
100 
108  void SetPitchTrim(float value);
109 
117  void SetYawTrim(float value);
118 
126  void Update(core::Time time);
127 
135  void LockUserInterface(void) const;
136 
143  void UnlockUserInterface(void) const;
144 
152  gui::Layout *GetLayout(void) const;
153 
160  virtual void UseDefaultPlot(void){};
161 
169  virtual uint8_t MotorsCount(void) const = 0;
170 
179  int MultiplexValue(int index) const;
180 
188  gui::TabWidget *GetTabWidget(void) const;
189 
190 protected:
200  void SetMultiplexComboBox(std::string name, int index);
201 
202 private:
213  virtual void UpdateFrom(const core::io_data *data) = 0;
214 
215  UavMultiplex_impl *pimpl_;
216 };
217 } // end namespace filter
218 } // end namespace flair
219 #endif // UAVMULTIPLEX_H
Abstract class for data types.
Definition: io_data.h:94
void SetRollTrim(float value)
Set roll trim.
Abstract class for input/ouput system.
Definition: IODevice.h:44
namespace of the flair Framework
Definition: Ahrs.h:19
unsigned long long Time
Time definition, in ns.
Definition: Object.h:49
void SetPitchTrim(float value)
Set pitch trim.
int MultiplexValue(int index) const
Multiplex value.
Abstract class for input/ouput system.
void Update(core::Time time)
Update using provided datas.
void SetThrust(float value)
Set thrust.
Abstract class to display a layout on the ground station.
Definition: Layout.h:33
Class defining uav multiplexing.
Definition: UavMultiplex.h:38
Main class of the Framework library.
Definition: FrameworkManager.h:45
Class displaying a QTabWidget on the ground station.
Definition: TabWidget.h:29
gui::Layout * GetLayout(void) const
Layout.
gui::TabWidget * GetTabWidget(void) const
Get TabWidget.
void UnlockUserInterface(void) const
Unlock user interface.
void SetMultiplexComboBox(std::string name, int index)
Set multiplex ComboBox.
virtual uint8_t MotorsCount(void) const =0
Motors count.
void SetYawTrim(float value)
Set yaw trim.
UavMultiplex(const core::FrameworkManager *parent, std::string name)
Constructor.
void LockUserInterface(void) const
Lock user interface.
virtual void UseDefaultPlot(void)
Use default plot.
Definition: UavMultiplex.h:160
void SetPitch(float value)
Set pitch torque.
void SetYaw(float value)
Set yaw torque.
void SetRoll(float value)
Set roll torque.