Base class used to implement BaseDevice/DeviceComponent-based devices on top of VRPN. More...
#include <osvr/Common/DeviceWrapper.h>
Public Member Functions | |
DeviceWrapper (std::string const &name, vrpn_ConnectionPtr const &conn, bool client) | |
![]() | |
virtual | ~BaseDevice () |
Virtual destructor. More... | |
template<typename T > | |
T * | addComponent (shared_ptr< T > component) |
Adds a component to a base device. More... | |
void | registerHandler (vrpn_MESSAGEHANDLER handler, void *userdata, RawMessageType const &msgType) |
void | unregisterHandler (vrpn_MESSAGEHANDLER handler, void *userdata, RawMessageType const &msgType) |
template<typename T > | |
void | registerMessageType (MessageRegistration< T > &messageReg) |
Call with a MessageRegistration object, and the message type will be registered and stored in the type field. | |
RawSenderType | getSender () |
void | update () |
Called from the outside to run the mainloop on the device and its components. | |
void | sendPending () |
Called from a component to send pending messages instead of waiting for next time. | |
template<typename T , typename ClassOfService > | |
void | packMessage (Buffer< T > const &buf, RawMessageType const &msgType, util::time::TimeValue const ×tamp, class_of_service::ClassOfServiceBase< ClassOfService > const &) |
template<typename T > | |
void | packMessage (Buffer< T > const &buf, RawMessageType const &msgType, util::time::TimeValue const ×tamp) |
template<typename T , typename ClassOfService > | |
void | packMessage (Buffer< T > const &buf, RawMessageType const &msgType, class_of_service::ClassOfServiceBase< ClassOfService > const &) |
template<typename T > | |
void | packMessage (Buffer< T > const &buf, RawMessageType const &msgType) |
std::string const & | getDeviceName () const |
Additional Inherited Members | |
![]() | |
BaseDevice () | |
Constructor. | |
void | m_setup (vrpn_ConnectionPtr conn, RawSenderType sender, std::string const &name) |
Should be called by derived class to set the connection, etc. | |
vrpn_ConnectionPtr | m_getConnection () const |
Accessor for underlying connection. | |
Base class used to implement BaseDevice/DeviceComponent-based devices on top of VRPN.
Definition at line 43 of file DeviceWrapper.h.