MCPcopy Create free account
hub / github.com/OSVR/OSVR-Core / DummyDevice

Method DummyDevice

tests/plugins/com_osvr_example_DummyAsync.cpp:41–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39class DummyDevice {
40 public:
41 DummyDevice(OSVR_PluginRegContext ctx) {
42 std::cout << "Constructing dummy device" << std::endl;
43
44 /// Create an asynchronous (threaded) device
45 osvrDeviceAsyncInit(
46 ctx, "MyAsyncDevice",
47 &m_dev); // Puts an object in m_dev that knows it's a
48 // threaded device so osvrDeviceSendData knows
49 // that it needs to get a connection lock first.
50
51 /// Sets the update callback
52 osvrDeviceRegisterUpdateCallback(m_dev, &DummyDevice::update, this);
53 }
54
55 /// Trampoline: C-compatible callback bouncing into a member function.
56 /// Future enhancements to the C++ wrappers will make this tiny function

Callers

nothing calls this directly

Calls 2

osvrDeviceAsyncInitFunction · 0.85

Tested by

no test coverage detected