Flair
Framework Libre Air
VrpnObject.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}
14 #ifndef VRPNOBJECT_H
15 #define VRPNOBJECT_H
16 
17 #include <IODevice.h>
18 #include <stdint.h>
19 
20 namespace flair {
21 namespace core {
22 class cvmatrix;
23 class Vector3D;
24 class Euler;
25 class Quaternion;
26 }
27 namespace gui {
28 class TabWidget;
29 class Tab;
30 class DataPlot1D;
31 }
32 }
33 
34 class VrpnObject_impl;
35 class VrpnClient_impl;
36 
37 namespace flair {
38 namespace sensor {
39 class VrpnClient;
40 
45 class VrpnObject : public core::IODevice {
46  friend class ::VrpnObject_impl;
47  friend class ::VrpnClient_impl;
48 
49 public:
59  VrpnObject(const VrpnClient *parent, std::string name,
60  const gui::TabWidget *tab);
61 
72  VrpnObject(const VrpnClient *parent, std::string name, uint8_t id,
73  const gui::TabWidget *tab);
74 
79  ~VrpnObject(void);
80 
86  gui::Tab *GetPlotTab(void) const;
87 
93  core::Time GetLastPacketTime(void) const;
94 
101  bool IsTracked(unsigned int timeout_ms) const;
102 
108  void GetEuler(core::Euler &euler) const;
109 
115  void GetQuaternion(core::Quaternion &quaternion) const;
121  void GetPosition(core::Vector3D &point) const;
122 
136  core::cvmatrix *Output(void) const;
137 
148  core::cvmatrix *State(void) const;
149 
155  gui::DataPlot1D *xPlot(void) const;
156 
162  gui::DataPlot1D *yPlot(void) const;
163 
169  gui::DataPlot1D *zPlot(void) const;
170 
171 private:
179  void UpdateFrom(const core::io_data *data){};
180 
181  void mainloop(void);
182  class VrpnObject_impl *pimpl_;
183 };
184 } // end namespace sensor
185 } // end namespace flair
186 #endif // VRPNOBJECT_H
Abstract class for data types.
Definition: io_data.h:94
gui::DataPlot1D * zPlot(void) const
z plot
Abstract class for input/ouput system.
Definition: IODevice.h:44
core::Time GetLastPacketTime(void) const
Get Last Packet Time.
namespace of the flair Framework
Definition: Ahrs.h:19
Class for VRPN object.
Definition: VrpnObject.h:45
Class defining a matrix of kind CvMat.
Definition: cvmatrix.h:33
Class defining a 3D vector.
Definition: Vector3D.h:28
gui::DataPlot1D * xPlot(void) const
x plot
Class defining euler angles.
Definition: Euler.h:27
unsigned long long Time
Time definition, in ns.
Definition: Object.h:49
VrpnObject(const VrpnClient *parent, std::string name, const gui::TabWidget *tab)
Constructor.
gui::Tab * GetPlotTab(void) const
Plot tab.
Abstract class for input/ouput system.
~VrpnObject(void)
Destructor.
void GetEuler(core::Euler &euler) const
Get Euler angles.
gui::DataPlot1D * yPlot(void) const
y plot
bool IsTracked(unsigned int timeout_ms) const
Is object tracked?
Class displaying a QTabWidget on the ground station.
Definition: TabWidget.h:29
core::cvmatrix * Output(void) const
Output matrix.
void GetQuaternion(core::Quaternion &quaternion) const
Get Quaternion.
core::cvmatrix * State(void) const
State matrix.
Class to connect to a Vrpn server.
Definition: VrpnClient.h:39
void GetPosition(core::Vector3D &point) const
Get Position.
Class displaying a 1D plot on the ground station.
Definition: DataPlot1D.h:33
Class defining a quaternion.
Definition: Quaternion.h:25
Class displaying a QTab on the ground station.
Definition: Tab.h:29