-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsoft_knuckles_debug_handler.h
38 lines (32 loc) · 1.16 KB
/
soft_knuckles_debug_handler.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//////////////////////////////////////////////////////////////////////////////
// soft_knuckles_debug_handler.h
//
// The "soft" in soft_knuckles is to be able to use software
// to simulate a knuckles controller. To simulate a knuckles controller, the
// debug_handler is is registered on each soft_knuckles device and receives
// requests to change input component states.
//
// This module uses the DebugRequest mechanism provided by
// ITrackedDeviceServerDriver and uses the input configuration provided by
// soft_knuckles_config.h
//
// See soft_knuckles_debug_client.cpp for an example client.
//
#include <openvr_driver.h>
#include <unordered_map>
class SoftKnucklesDevice;
namespace soft_knuckles
{
class SoftKnucklesDebugHandler
{
SoftKnucklesDevice *m_device;
std::unordered_map<std::string, uint32_t> m_inputstring2index;
public:
SoftKnucklesDebugHandler();
void Init(SoftKnucklesDevice *);
void DebugRequest(const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize);
private:
void InitializeLookupTable();
void SetPosition(double x, double y, double z);
};
};