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 io_data;
22 }
23 namespace gui {
24 class TabWidget;
25 class Layout;
26 }
27 }
28 
29 class UavMultiplex_impl;
30 
31 namespace flair {
32 namespace filter {
37 class UavMultiplex : public core::IODevice {
38 public:
46  UavMultiplex(std::string name);
47 
52  ~UavMultiplex();
53 
61  void SetRoll(float value);
62 
70  void SetPitch(float value);
71 
79  void SetYaw(float value);
80 
88  void SetThrust(float value);
89 
97  void SetRollTrim(float value);
98 
106  void SetPitchTrim(float value);
107 
115  void SetYawTrim(float value);
116 
124  void Update(core::Time time);
125 
133  void LockUserInterface(void) const;
134 
141  void UnlockUserInterface(void) const;
142 
150  gui::Layout *GetLayout(void) const;
151 
158  virtual void UseDefaultPlot(void){};
159 
167  virtual uint8_t MotorsCount(void) const = 0;
168 
177  int MultiplexValue(int index) const;
178 
186  gui::TabWidget *GetTabWidget(void) const;
187 
188 protected:
198  void SetMultiplexComboBox(std::string name, int index);
199 
200 private:
211  virtual void UpdateFrom(const core::io_data *data) = 0;
212 
213  UavMultiplex_impl *pimpl_;
214 };
215 } // end namespace filter
216 } // end namespace flair
217 #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:45
namespace of the flair Framework
Definition: Ahrs.h:19
unsigned long long Time
Time definition, in ns.
Definition: Object.h:55
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:37
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.
UavMultiplex(std::string name)
Constructor.
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.
void LockUserInterface(void) const
Lock user interface.
virtual void UseDefaultPlot(void)
Use default plot.
Definition: UavMultiplex.h:158
void SetPitch(float value)
Set pitch torque.
void SetYaw(float value)
Set yaw torque.
void SetRoll(float value)
Set roll torque.