vrpn 07.35
Virtual Reality Peripheral Network
 
Loading...
Searching...
No Matches
vrpn_Tracker_OSVRHackerDevKit.h
Go to the documentation of this file.
1
10
11#ifndef VRPN_TRACKER_OSVR_HACKER_DEV_KIT_H_
12#define VRPN_TRACKER_OSVR_HACKER_DEV_KIT_H_
13
14#include <cstddef> // for size_t
15#include <string> // for string
16
17#include "vrpn_Tracker.h" // for vrpn_Tracker
18#include "vrpn_Analog.h" // for vrpn_Analog
19#include "vrpn_Configure.h" // for VRPN_API, VRPN_USE_HID
20#include "vrpn_Connection.h" // for vrpn_Connection (ptr only), etc
21#include "vrpn_HumanInterface.h" // for vrpn_HIDDEVINFO, etc
22#include "vrpn_Shared.h" // for timeval
23#include "vrpn_Types.h" // for vrpn_uint16, vrpn_uint32, etc
24
25#if defined(VRPN_USE_HID)
26
86 public vrpn_Analog,
87 protected vrpn_HidInterface {
88public:
96 vrpn_Tracker_OSVRHackerDevKit(const char *name, hid_device *dev = NULL,
97 vrpn_Connection *c = NULL);
98
103
108
112 virtual void mainloop();
113
120
121protected:
123 void on_data_received(std::size_t bytes, vrpn_uint8 *buffer);
124 void shared_init();
125
127 struct timeval _timestamp;
128
134
136 vrpn_uint16 _messageCount;
137
138 vrpn_uint8 _reportVersion;
140};
141
142#endif // VRPN_USE_HID
143
144#endif // VRPN_TRACKER_OSVR_HACKER_DEV_KIT_H_
vrpn_Analog(const char *name, vrpn_Connection *c=NULL)
Definition vrpn_Analog.C:14
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
Generic connection class not specific to the transport mechanism.
vrpn_HidInterface(vrpn_HidAcceptor *acceptor, vrpn_uint16 vendor=0, vrpn_uint16 product=0, hid_device *device=NULL)
Constructor If we already have a HID device from some other source, it can be passed and we'll take o...
virtual void on_data_received(size_t bytes, vrpn_uint8 *buffer)=0
Derived class reimplements this callback.
bool _wasConnected
Flag indicating whether we were connected last time through the mainloop. Used to send a "normal"-sev...
vrpn_Tracker_OSVRHackerDevKit(const char *name, hid_device *dev=NULL, vrpn_Connection *c=NULL)
Constructor.
vrpn_uint16 _messageCount
Used to forcibly send the analog update every so often.
struct timeval _timestamp
Timestamp updated during mainloop()
vrpn_Tracker(const char *name, vrpn_Connection *c=NULL, const char *tracker_cfg_file_name=NULL)
#define VRPN_API
struct hid_device_ hid_device