25 #ifndef INCLUDED_SystemComponent_h_GUID_F74B8728_915D_44AE_612B_6AB934CA4ED2
26 #define INCLUDED_SystemComponent_h_GUID_F74B8728_915D_44AE_612B_6AB934CA4ED2
36 #include <json/value.h>
48 std::string
const &message);
50 static const char *identifier();
56 static const char *identifier();
63 static const char *identifier();
70 static const char *identifier();
79 OSVR_COMMON_EXPORT
static const char *
deviceName();
84 static OSVR_COMMON_EXPORT shared_ptr<SystemComponent>
create();
89 OSVR_COMMON_EXPORT
void sendRoutes(std::string
const &routes);
90 OSVR_COMMON_EXPORT
void
91 registerRoutesHandler(vrpn_MESSAGEHANDLER handler,
void *userdata);
100 OSVR_COMMON_EXPORT
void sendClientRouteUpdate(std::string
const &route);
101 OSVR_COMMON_EXPORT
void
102 registerClientRouteUpdateHandler(vrpn_MESSAGEHANDLER handler,
109 typedef std::function<void(Json::Value
const &,
111 OSVR_COMMON_EXPORT
void registerReplaceTreeHandler(JsonHandler cb);
113 OSVR_COMMON_EXPORT
void sendReplacementTree(
PathTree &tree);
117 virtual void m_parentSet();
118 static int VRPN_CALLBACK
119 m_handleReplaceTree(
void *userdata, vrpn_HANDLERPARAM p);
121 std::vector<JsonHandler> m_replaceTreeHandlers;
126 #endif // INCLUDED_SystemComponent_h_GUID_F74B8728_915D_44AE_612B_6AB934CA4ED2
RAII class template managing a message handler callback.
messages::ReplacementTreeFromServer treeOut
Message from server, updating/replacing the client's configuration.
A tree representation, with path/url syntax, of the known OSVR system.
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...
CRTP class template wrapping message-specific data and/or logic.
messages::RoutesFromServer routesOut
Message from server to client, replacing all routes.
static shared_ptr< SystemComponent > create()
Factory method.
Automatically-generated export header - do not edit!
static const char * deviceName()
Get the special device name to be used with this component.
BaseDevice component, to be used only with the "OSVR" special device.
Standardized, portable parallel to struct timeval for representing both absolute times and time inter...