OSVR-Core
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
osvr::common::LocomotionComponent Class Reference

BaseDevice component. More...

#include <LocomotionComponent.h>

Inheritance diagram for osvr::common::LocomotionComponent:
osvr::common::DeviceComponent

Public Types

typedef std::function< void(NaviVelocityData const &, util::time::TimeValue const &)> NaviVelocityHandler
 
typedef std::function< void(NaviPositionData const &, util::time::TimeValue const &)> NaviPositionHandler
 
- Public Types inherited from osvr::common::DeviceComponent
typedef BaseDevice Parent
 

Public Member Functions

OSVR_COMMON_EXPORT void sendNaviVelocityData (OSVR_NaviVelocityState naviVelState, OSVR_ChannelCount sensor, OSVR_TimeValue const &timestamp)
 
OSVR_COMMON_EXPORT void sendNaviPositionData (OSVR_NaviPositionState naviPosnState, OSVR_ChannelCount sensor, OSVR_TimeValue const &timestamp)
 
OSVR_COMMON_EXPORT void registerNaviVelocityHandler (NaviVelocityHandler cb)
 
OSVR_COMMON_EXPORT void registerNaviPositionHandler (NaviPositionHandler cb)
 
- Public Member Functions inherited from osvr::common::DeviceComponent
void recordParent (Parent &dev)
 Called (only) by BaseDevice when being added: effectively records a "parent pointer" that does not convey ownership. More...
 
void update ()
 Called during mainloop.
 

Static Public Member Functions

static OSVR_COMMON_EXPORT shared_ptr< LocomotionComponentcreate ()
 Factory method. More...
 

Public Attributes

messages::NaviVelocityRecord naviVelRecord
 Message from server to client, containing navigation velocity.
 
messages::NaviPositionRecord naviPosnRecord
 Optional message from server to client, containing navigation position.
 

Additional Inherited Members

- Protected Member Functions inherited from osvr::common::DeviceComponent
 DeviceComponent ()
 Protected constructor, to require subclassing.
 
bool m_hasParent () const
 Returns true if we have a parent registered.
 
Parentm_getParent ()
 Gets the parent - only call if m_hasParent() is true.
 
void m_registerHandler (vrpn_MESSAGEHANDLER handler, void *userdata, RawMessageType const &msgType)
 Registers a handler whose lifetime is tied to the lifetime of the component. More...
 
virtual void m_update ()
 Implementation-specific (optional) stuff to do during mainloop.
 

Detailed Description

BaseDevice component.

Member Function Documentation

§ create()

shared_ptr< LocomotionComponent > osvr::common::LocomotionComponent::create ( )
static

Factory method.

Required to ensure that allocation and deallocation stay on the same side of a DLL line.


The documentation for this class was generated from the following files: