vrpn  07.33
Virtual Reality Peripheral Network
vrpn_3DMicroscribe.h
Go to the documentation of this file.
1 #ifndef VRPN_3DMICROSCRIBE_H
2 #define VRPN_3DMICROSCRIBE_H
3 
4 #include "vrpn_Button.h" // for vrpn_Button_Filter
5 #include "vrpn_Configure.h" // for VRPN_API
6 #include "vrpn_Connection.h" // for vrpn_CONNECTION_LOW_LATENCY, etc
7 #include "vrpn_Shared.h" // for timeval
8 #include "vrpn_Tracker.h" // for vrpn_Tracker
9 #include "vrpn_Types.h" // for vrpn_uint32
10 
12  ,public vrpn_Button_Filter
13 {
14  public:
15  // Offset is in meters. Scale is an abomination and should not be
16  // used. All tracker reports should be in meters in VRPN.
17  vrpn_3DMicroscribe (const char * name, vrpn_Connection * c,
18  const char * Port, long int BaudRate,
19  float OffsetX = 0.0f, float OffsetY = 0.0f, float OffsetZ = 0.0f,
20  float Scale=1.0f);
21 
23 
25  virtual void mainloop ();
26 
27  virtual int reset(void);
28 
29  protected:
30  float m_OffSet[3];
31  float m_Scale;
33  long int m_BaudRate;
34 
35 
37  unsigned char buf[512];
38  int bufpos;
39  int packtype;
40  int packlen;
44  struct timeval timestamp;
45 
46  void ConvertOriToQuat(float ori[3]); //< directly put the values in the quat for message sending
47  virtual void clear_values(void);
48 
51  virtual int get_report(void);
52 
54  virtual void report_changes (vrpn_uint32 class_of_service
56 
58  virtual void report (vrpn_uint32 class_of_service
60 
61  // NOTE: class_of_service is only applied to vrpn_Tracker
62  // values, not vrpn_Button, which are always vrpn_RELIABLE
63 };
64 
65 #endif
const vrpn_uint32 vrpn_CONNECTION_LOW_LATENCY
int packtype
What kind of packet we are decoding.
int m_PortNumber
port number
int resetoccured
A reset event has occurred.
int escapedchar
We're processing an escaped char.
long int m_BaudRate
baud rate
Generic connection class not specific to the transport mechanism.
#define VRPN_API
virtual void report_changes(void)
Definition: vrpn_Button.C:382
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
int erroroccured
A device error has occurred.
int packlen
Expected packet length.
int _numbuttons
How many buttons to open.
int bufpos
Current char pos in buffer.
All button servers should derive from this class, which provides the ability to turn any of the butto...
Definition: vrpn_Button.h:65