|
| DeviceToken (OSVR_DeviceToken device) |
| Constructor wrapping an existing device token.
|
|
| DeviceToken () |
| Default constructor.
|
|
| operator OSVR_DeviceToken () const |
| Conversion operator to the un-wrapped device token.
|
|
void | initSync (OSVR_IN_PTR OSVR_PluginRegContext ctx, OSVR_IN_STRZ const char *name, OSVR_IN_OPT OSVR_DeviceInitOptions options=NULL) |
| Initialize this device token as synchronous, with the given name and options. More...
|
|
void | initSync (OSVR_IN_PTR OSVR_PluginRegContext ctx, OSVR_IN std::string const &name, OSVR_IN_OPT OSVR_DeviceInitOptions options=NULL) |
|
void | initAsync (OSVR_IN_PTR OSVR_PluginRegContext ctx, OSVR_IN_STRZ const char *name, OSVR_IN_OPT OSVR_DeviceInitOptions options=NULL) |
| Initialize this device token as asynchronous, with the given name and options. More...
|
|
void | initAsync (OSVR_IN_PTR OSVR_PluginRegContext ctx, OSVR_IN std::string const &name, OSVR_IN_OPT OSVR_DeviceInitOptions options=NULL) |
|
template<typename InterfaceType , typename MessageType > |
void | send (InterfaceType &iface, MessageType const &msg, OSVR_TimeValue const ×tamp) |
| Send a message on a registered interface type, providing the timestamp yourself. More...
|
|
template<typename InterfaceType , typename MessageType > |
void | send (InterfaceType &iface, MessageType const &msg) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This version takes the current time and uses it as the timestamp. More...
|
|
void | sendJsonDescriptor (OSVR_IN_READS(len) const char *json, OSVR_IN size_t len) |
| Submit a JSON self-descriptor string for the device. More...
|
|
template<size_t N> |
void | sendJsonDescriptor (const char(&json)[N]) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.For string literals: automatically deduces the length at compile time. More...
|
|
void | sendJsonDescriptor (OSVR_IN std::string const &json) |
|
template<typename DeviceObjectType > |
void | registerUpdateCallback (OSVR_IN_PTR DeviceObjectType *object) |
| Given a pointer to your object that has a public OSVR_ReturnCode update() method, registers that instance and method as the update callback for the device. More...
|
|
|
Rarely needed
Send a raw bytestream from your device with a custom message type.
- Note
- The same function is used for synchronous and asynchronous devices: the device token is sufficient to determine whether locking is needed.
- Parameters
-
msg | The registered message type. |
bytestream | A string of bytes to transmit. |
len | The length of the string of bytes. |
- Exceptions
-
std::runtime_error | if error in sending. |
|
void | sendData (OSVR_IN_PTR OSVR_MessageType msg, OSVR_IN_READS(len) const char *bytestream=NULL, OSVR_IN size_t len=0) |
|
template<size_t N> |
void | sendData (OSVR_MessageType msg, const char(&bytestream)[N]) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.For string literals: automatically deduces the length at compile time. More...
|
|
void | sendData (OSVR_IN_PTR OSVR_MessageType msg, OSVR_IN std::string const &bytestream) |
|
void | sendData (OSVR_IN_PTR OSVR_MessageType msg, OSVR_IN std::vector< char > const &bytestream) |
|
void | sendData (OSVR_IN OSVR_TimeValue const ×tamp, OSVR_IN_PTR OSVR_MessageType msg, OSVR_IN_READS(len) const char *bytestream=NULL, OSVR_IN size_t len=0) |
| Sends a raw bytestream from your device with a known timestamp. More...
|
|
template<size_t N> |
void | sendData (OSVR_IN OSVR_TimeValue const ×tamp, OSVR_MessageType msg, const char(&bytestream)[N]) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.For string literals: automatically deduces the length at compile time. More...
|
|
void | sendData (OSVR_IN OSVR_TimeValue const ×tamp, OSVR_IN_PTR OSVR_MessageType msg, OSVR_IN std::string const &bytestream) |
|
void | sendData (OSVR_IN OSVR_TimeValue const ×tamp, OSVR_IN_PTR OSVR_MessageType msg, OSVR_IN std::vector< char > const &bytestream) |
|
Wrapper class for OSVR_DeviceToken.