|
OSVR-Core
|
Base class for connection-specific device data, owned by a DeviceToken. More...
#include <ConnectionDevice.h>
Public Types | |
| typedef std::vector< std::string > | NameList |
Public Member Functions | |
| virtual OSVR_CONNECTION_EXPORT | ~ConnectionDevice () |
| destructor | |
| OSVR_CONNECTION_EXPORT std::string const & | getName () const |
| accessor for (primary) device name | |
| NameList const & | getNames () const |
| accessor for device names | |
| void | process () |
| Process messages. 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. | |
| OSVR_CONNECTION_EXPORT void | setDeviceDescriptor (std::string const &jsonString) |
| Send new/updated JSON device descriptor. More... | |
| OSVR_CONNECTION_EXPORT 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. More... | |
| DeviceToken & | m_getDeviceToken () |
| accessor for device token | |
| virtual void | m_process ()=0 |
| (Subclass implementation) Process messages. More... | |
| virtual void | m_sendData (util::time::TimeValue const ×tamp, MessageType *type, const char *bytestream, size_t len)=0 |
| (Subclass implementation) Send message. | |
| OSVR_CONNECTION_EXPORT | ConnectionDevice (std::string const &name) |
| Constructor for use by derived classes only. | |
| OSVR_CONNECTION_EXPORT | ConnectionDevice (NameList const &names) |
| Constructor for use by derived classes only. | |
Base class for connection-specific device data, owned by a DeviceToken.
|
protected |
Does this connection device have a device token? Should be true in nearly every case.
|
protectedpure virtual |
(Subclass implementation) Process messages.
This shouldn't block.
Implemented in osvr::connection::VrpnConnectionDevice, and osvr::connection::GenericConnectionDevice.
| void osvr::connection::ConnectionDevice::process | ( | ) |
Process messages.
This shouldn't block.
Someone needs to call this method frequently.
| 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!
1.8.12