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

Function osvrTrackerSend

src/osvr/PluginKit/TrackerInterfaceC.cpp:59–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57
58template <typename StateType>
59static inline OSVR_ReturnCode
60osvrTrackerSend(const char method[], OSVR_DeviceToken,
61 OSVR_TrackerDeviceInterface iface, StateType const *val,
62 OSVR_ChannelCount chan, OSVR_TimeValue const *timestamp) {
63 OSVR_PLUGIN_HANDLE_NULL_CONTEXT(method, iface);
64 OSVR_PLUGIN_HANDLE_NULL_CONTEXT(method, timestamp);
65
66 auto guard = iface->getSendGuard();
67 if (guard->lock()) {
68 iface->tracker->sendReport(*val, chan, *timestamp);
69 return OSVR_RETURN_SUCCESS;
70 }
71
72 return OSVR_RETURN_FAILURE;
73}
74OSVR_ReturnCode
75osvrDeviceTrackerSendPose(OSVR_IN_PTR OSVR_DeviceToken dev,
76 OSVR_IN_PTR OSVR_TrackerDeviceInterface iface,

Calls 3

lockMethod · 0.80
sendReportMethod · 0.80
getSendGuardMethod · 0.45

Tested by

no test coverage detected