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 <Vector3D.h>
19 #include <stdint.h>
20 
21 namespace flair {
22  namespace core {
23  class cvmatrix;
24  class Quaternion;
25  }
26  namespace gui {
27  class TabWidget;
28  class Tab;
29  class DataPlot1D;
30  }
31 }
32 
33 class VrpnObject_impl;
34 class VrpnClient_impl;
35 
36 namespace flair {
37 namespace sensor {
38 class VrpnClient;
39 
45 class VrpnObject : public core::IODevice {
46  friend class ::VrpnObject_impl;
47  friend class ::VrpnClient_impl;
48 
49 public:
58  VrpnObject(std::string name,
59  const gui::TabWidget *tab);
60 
70  VrpnObject(std::string name, uint8_t id,
71  const gui::TabWidget *tab);
72 
77  ~VrpnObject(void);
78 
84  gui::Tab *GetPlotTab(void) const;
85 
91  core::Time GetLastPacketTime(void) const;
92 
99  bool IsTracked(unsigned int timeout_ms) const;
100 
106  void GetQuaternion(core::Quaternion &quaternion) const;
112  void GetPosition(core::Vector3Df &point) const;
113 
128  core::cvmatrix *Output(void) const;
129 
141  core::cvmatrix *State(void) const;
142 
148  gui::DataPlot1D *xPlot(void) const;
149 
155  gui::DataPlot1D *yPlot(void) const;
156 
162  gui::DataPlot1D *zPlot(void) const;
163 
164 private:
172  void UpdateFrom(const core::io_data *data){};
173 
174  class VrpnObject_impl *pimpl_;
175 };
176 } // end namespace sensor
177 } // end namespace flair
178 #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:45
VrpnObject(std::string name, const gui::TabWidget *tab)
Constructor.
Class defining a matrix of kind CvMat.
Definition: cvmatrix.h:33
gui::DataPlot1D * xPlot(void) const
x plot
unsigned long long Time
Time definition, in ns.
Definition: Object.h:49
Class defining a 3D vector.
void GetPosition(core::Vector3Df &point) const
Get Position.
gui::Tab * GetPlotTab(void) const
Plot tab.
Abstract class for input/ouput system.
~VrpnObject(void)
Destructor.
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 displaying a 1D plot on the ground station.
Definition: DataPlot1D.h:33
Class defining a quaternion.
Definition: Quaternion.h:26
Class displaying a QTab on the ground station.
Definition: Tab.h:29