A device token for a device that does not have a standard update or wait callback - for instance, the system data device. More...
#include <osvr/Connection/VirtualDeviceToken.h>
Public Member Functions | |
| VirtualDeviceToken (std::string const &name) | |
Public Member Functions inherited from OSVR_DeviceTokenObject | |
| virtual | ~OSVR_DeviceTokenObject () |
| Destructor. | |
| std::string const & | getName () const |
| Accessor for name property. | |
| void | setUpdateCallback (osvr::connection::DeviceUpdateCallback const &cb) |
| Sets the update/wait callback. | |
| void | setPreConnectionInteract (EventFunction const &f) |
| Sets a function to be executed at the beginning of connectionInteract() | |
| void | sendData (osvr::connection::MessageType *type, const char *bytestream, size_t len) |
| Send data. More... | |
| void | sendData (osvr::util::time::TimeValue const ×tamp, osvr::connection::MessageType *type, const char *bytestream, size_t len) |
| Send data. More... | |
| osvr::util::GuardPtr | getSendGuard () |
| void | connectionInteract () |
| Interact with connection. Only legal to end up in ConnectionDevice::sendData from within here somehow. | |
| void | stopThreads () |
| Stop any threads spawned and owned by this DeviceToken. | |
| void | setDeviceDescriptor (std::string const &jsonString) |
| Send a new or updated device descriptor for this device. | |
| template<typename T > | |
| void * | acquireObject (T obj) |
| Pass (smart-pointer) ownership of some object to the client context. | |
| bool | releaseObject (void *obj) |
| Frees some object whose lifetime is controlled by the client context. More... | |
Protected Member Functions | |
| void | m_setUpdateCallback (osvr::connection::DeviceUpdateCallback const &) override |
| Should never be called. | |
| void | m_sendData (util::time::TimeValue const ×tamp, MessageType *type, const char *bytestream, size_t len) override |
| util::GuardPtr | m_getSendGuard () override |
| void | m_connectionInteract () override |
Protected Member Functions inherited from OSVR_DeviceTokenObject | |
| OSVR_DeviceTokenObject (std::string const &name) | |
| osvr::connection::ConnectionPtr | m_getConnection () |
| osvr::connection::ConnectionDevicePtr | m_getConnectionDevice () |
| virtual void | m_stopThreads () |
Additional Inherited Members | |
Public Types inherited from OSVR_DeviceTokenObject | |
| using | EventFunction = std::function< void()> |
Static Public Member Functions inherited from OSVR_DeviceTokenObject | |
|
static osvr::connection::DeviceTokenPtr | createAsyncDevice (osvr::connection::DeviceInitObject &init) |
|
static osvr::connection::DeviceTokenPtr | createSyncDevice (osvr::connection::DeviceInitObject &init) |
| Creates a device token (and underlying ConnectionDevice) that has an update method that runs in the server mainloop. | |
|
static osvr::connection::DeviceTokenPtr | createVirtualDevice (std::string const &name, osvr::connection::ConnectionPtr const &conn) |
| Creates a device token (and underlying ConnectionDevice) without a traditional, built-in update method - typically for server-internal usage. | |
A device token for a device that does not have a standard update or wait callback - for instance, the system data device.
Definition at line 41 of file VirtualDeviceToken.h.