Base class for connection-specific device data, owned by a DeviceToken. More...
#include <osvr/Connection/ConnectionDevice.h>
Public Types | |
| typedef std::vector< std::string > | NameList |
Public Member Functions | |
| virtual | ~ConnectionDevice () |
| destructor | |
| std::string const & | getName () const |
| accessor for (primary) device name | |
| NameList const & | getNames () const |
| accessor for device names | |
| void | process () |
| Process messages. This shouldn't block. More... | |
| void | sendData (util::time::TimeValue const ×tamp, MessageType *type, const char *bytestream, size_t len) |
| Send message (as primary device name) | |
| void | setDeviceToken (DeviceToken &token) |
| For use only by DeviceToken. | |
| void | setDeviceDescriptor (std::string const &jsonString) |
| Send new/updated JSON device descriptor. More... | |
| std::string const & | getDeviceDescriptor () const |
| Get the most current JSON device descriptor. | |
Protected Member Functions | |
| bool | m_hasDeviceToken () const |
| Does this connection device have a device token? Should be true in nearly every case. | |
| DeviceToken & | m_getDeviceToken () |
| accessor for device token | |
| virtual void | m_process ()=0 |
| (Subclass implementation) Process messages. This shouldn't block. | |
| virtual void | m_sendData (util::time::TimeValue const ×tamp, MessageType *type, const char *bytestream, size_t len)=0 |
| (Subclass implementation) Send message. | |
| ConnectionDevice (std::string const &name) | |
| Constructor for use by derived classes only. | |
| ConnectionDevice (NameList const &names) | |
| Constructor for use by derived classes only. | |
Base class for connection-specific device data, owned by a DeviceToken.
Definition at line 46 of file ConnectionDevice.h.
| void osvr::connection::ConnectionDevice::process | ( | ) |
Process messages. This shouldn't block.
Someone needs to call this method frequently.
Definition at line 54 of file ConnectionDevice.cpp.
| void osvr::connection::ConnectionDevice::setDeviceDescriptor | ( | std::string const & | jsonString | ) |
Send new/updated JSON device descriptor.
Note: does not trigger the descriptor handlers in connection - those must be triggered by the caller!
Definition at line 68 of file ConnectionDevice.cpp.