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 <VrpnClient.h>
19 #include <Vector3D.h>
20 #include <stdint.h>
21 
22 namespace flair {
23  namespace core {
24  class Matrix;
25  class Quaternion;
26  }
27  namespace gui {
28  class TabWidget;
29  class Tab;
30  class DataPlot1D;
31  }
32 }
33 
34 class VrpnObject_impl;
35 
36 namespace flair {
37 namespace sensor {
38 class VrpnClient;
39 
45 class VrpnObject : public core::IODevice {
46  friend class ::VrpnObject_impl;
47 
48 public:
58  VrpnObject(std::string name,
59  const gui::TabWidget *tab,sensor::VrpnClient *client=GetVrpnClient());
60 
71  VrpnObject(std::string name, uint8_t id,
72  const gui::TabWidget *tab,sensor::VrpnClient *client=GetVrpnClient());
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 GetQuaternion(core::Quaternion &quaternion) const;
113  void GetPosition(core::Vector3Df &point) const;
114 
129  core::Matrix *Output(void) const;
130 
142  core::Matrix *State(void) const;
143 
149  gui::DataPlot1D *xPlot(void) const;
150 
156  gui::DataPlot1D *yPlot(void) const;
157 
163  gui::DataPlot1D *zPlot(void) const;
164 
165 private:
173  void UpdateFrom(const core::io_data *data){};
174 
175  class VrpnObject_impl *pimpl_;
176 };
177 } // end namespace sensor
178 } // end namespace flair
179 #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
gui::DataPlot1D * xPlot(void) const
x plot
unsigned long long Time
Time definition, in ns.
Definition: Object.h:55
Class to connect to a Vrpn server.
Class defining a 3D vector.
void GetPosition(core::Vector3Df &point) const
Get Position.
gui::Tab * GetPlotTab(void) const
Plot tab.
core::Matrix * Output(void) const
Output matrix.
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
VrpnObject(std::string name, const gui::TabWidget *tab, sensor::VrpnClient *client=GetVrpnClient())
Constructor.
core::Matrix * State(void) const
State matrix.
VrpnClient * GetVrpnClient(void)
get VrpnClient
void GetQuaternion(core::Quaternion &quaternion) const
Get Quaternion.
Class defining a matrix.
Definition: Matrix.h:31
Class to connect to a Vrpn server. The Thread is created with the FrameworkManager as parent...
Definition: VrpnClient.h:40
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