OSVR Framework (Internal Development Docs)  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
osvr::common::SystemComponent Class Reference

BaseDevice component, to be used only with the "OSVR" special device. More...

#include <osvr/Common/SystemComponent.h>

Inheritance diagram for osvr::common::SystemComponent:
osvr::common::DeviceComponent

Public Types

typedef std::function< void(Json::Value
const &, util::time::TimeValue
const &)> 
JsonHandler
 
- Public Types inherited from osvr::common::DeviceComponent
typedef BaseDevice Parent
 

Public Member Functions

void sendRoutes (std::string const &routes)
 
void registerRoutesHandler (vrpn_MESSAGEHANDLER handler, void *userdata)
 
void sendClientRouteUpdate (std::string const &route)
 
void registerClientRouteUpdateHandler (vrpn_MESSAGEHANDLER handler, void *userdata)
 
void registerReplaceTreeHandler (JsonHandler cb)
 
void sendReplacementTree (PathTree &tree)
 
- 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.
 
void update ()
 Called during mainloop.
 

Static Public Member Functions

static const char * deviceName ()
 Get the special device name to be used with this component.
 
static shared_ptr
< SystemComponent
create ()
 Factory method. More...
 

Public Attributes

messages::RoutesFromServer routesOut
 Message from server to client, replacing all routes.
 
messages::AppStartupToServer appStartup
 Message from client to server, notifying of app ID.
 
messages::ClientRouteToServer routeIn
 Message from client, sending a single new/updated JSON routing directive in to the server.
 
messages::ReplacementTreeFromServer treeOut
 Message from server, updating/replacing the client's configuration.
 

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, to be used only with the "OSVR" special device.

Definition at line 76 of file SystemComponent.h.

Member Function Documentation

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

Factory method.

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

Definition at line 102 of file SystemComponent.cpp.


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