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 
46 class VrpnObject : public core::IODevice {
47  friend class ::VrpnObject_impl;
48  friend class ::VrpnClient_impl;
49 
50 public:
59  VrpnObject(std::string name,
60  const gui::TabWidget *tab);
61 
71  VrpnObject(std::string name, uint8_t id,
72  const gui::TabWidget *tab);
73 
78  ~VrpnObject(void);
79 
85  gui::Tab *GetPlotTab(void) const;
86 
92  core::Time GetLastPacketTime(void) const;
93 
100  bool IsTracked(unsigned int timeout_ms) const;
101 
107  void GetEuler(core::Euler &euler) const;
108 
114  void GetQuaternion(core::Quaternion &quaternion) const;
120  void GetPosition(core::Vector3D &point) const;
121 
135  core::cvmatrix *Output(void) const;
136 
147  core::cvmatrix *State(void) const;
148 
154  gui::DataPlot1D *xPlot(void) const;
155 
161  gui::DataPlot1D *yPlot(void) const;
162 
168  gui::DataPlot1D *zPlot(void) const;
169 
170 private:
178  void UpdateFrom(const core::io_data *data){};
179 
180  void mainloop(void);
181  class VrpnObject_impl *pimpl_;
182 };
183 } // end namespace sensor
184 } // end namespace flair
185 #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:45
core::Time GetLastPacketTime(void) const
Get Last Packet Time.
namespace of the flair Framework
Definition: Ahrs.h:19
Class for VRPN object. The IODevice is created with the VrpnClient as parent. VrpnClient must be crea...
Definition: VrpnObject.h:46
VrpnObject(std::string name, const gui::TabWidget *tab)
Constructor.
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
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.
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