vrpn 07.35
Virtual Reality Peripheral Network
Loading...
Searching...
No Matches
vrpn_Tracker_OSVRHackerDevKit.h
Go to the documentation of this file.
1
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
114 enum Status {
115 STATUS_UNKNOWN = 0,
116 STATUS_NO_VIDEO_INPUT = 1,
117 STATUS_PORTRAIT_VIDEO_INPUT = 2,
118 STATUS_LANDSCAPE_VIDEO_INPUT = 3
119 };
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_
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.
virtual void on_data_received(size_t bytes, vrpn_uint8 *buffer)=0
Derived class reimplements this callback.
OSVR Hacker Dev Kit HMD The official name of the Razer/Sensics HMD (until they change it again....
bool _wasConnected
Flag indicating whether we were connected last time through the mainloop. Used to send a "normal"-sev...
vrpn_uint16 _messageCount
Used to forcibly send the analog update every so often.
#define VRPN_API
struct hid_device_ hid_device