OSVR Framework (Internal Development Docs)  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
VirtualDeviceToken.cpp
Go to the documentation of this file.
1 
11 // Copyright 2014 Sensics, Inc.
12 //
13 // Licensed under the Apache License, Version 2.0 (the "License");
14 // you may not use this file except in compliance with the License.
15 // You may obtain a copy of the License at
16 //
17 // http://www.apache.org/licenses/LICENSE-2.0
18 //
19 // Unless required by applicable law or agreed to in writing, software
20 // distributed under the License is distributed on an "AS IS" BASIS,
21 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 // See the License for the specific language governing permissions and
23 // limitations under the License.
24 
25 // Internal Includes
26 #include "VirtualDeviceToken.h"
28 #include <osvr/Util/Verbosity.h>
30 
31 // Library/third-party includes
32 #include <boost/assert.hpp>
33 
34 // Standard includes
35 // - none
36 
37 namespace osvr {
38 namespace connection {
39  VirtualDeviceToken::VirtualDeviceToken(std::string const &name)
40  : OSVR_DeviceTokenObject(name) {}
41 
42  VirtualDeviceToken::~VirtualDeviceToken() {}
43 
45  osvr::connection::DeviceUpdateCallback const &) {
46  BOOST_ASSERT_MSG(0, "Should never be called - virtual device tokens "
47  "don't have typical update callbacks!");
48  }
49 
50  void VirtualDeviceToken::m_sendData(util::time::TimeValue const &timestamp,
51  MessageType *type,
52  const char *bytestream, size_t len) {
53  m_getConnectionDevice()->sendData(timestamp, type, bytestream, len);
54  }
55 
56  util::GuardPtr VirtualDeviceToken::m_getSendGuard() {
57  return util::GuardPtr(new util::DummyGuard);
58  }
59 
60  void VirtualDeviceToken::m_connectionInteract() {}
61 } // namespace connection
62 } // namespace osvr
A DeviceToken connects the generic device interaction code in PluginKit's C API with the workings of ...
Definition: DeviceToken.h:56
Base class for connection-specific message type registration.
Definition: MessageType.h:38
Internal, configured header file for verbosity macros.
void m_setUpdateCallback(osvr::connection::DeviceUpdateCallback const &) override
Should never be called.
Standardized, portable parallel to struct timeval for representing both absolute times and time inter...
Definition: TimeValueC.h:81