25 #ifndef INCLUDED_VrpnBasedConnection_h_GUID_49F2C30F_D807_43B1_A754_9B645D3A1809 26 #define INCLUDED_VrpnBasedConnection_h_GUID_49F2C30F_D807_43B1_A754_9B645D3A1809 33 #include <vrpn_Connection.h> 34 #include <vrpn_ConnectionPtr.h> 40 namespace connection {
47 enum ConnectionType { VRPN_LOCAL_ONLY, VRPN_SHARED, VRPN_LOOPBACK };
55 boost::optional<int> port);
58 virtual void *getUnderlyingObject();
59 virtual const char *getConnectionKindID();
68 void m_initConnection(
const char NIC[] =
nullptr,
int port = 0);
71 m_registerMessageType(std::string
const &messageId);
74 virtual void m_registerConnectionHandler(std::function<
void()> handler);
75 virtual void m_process();
77 static int VRPN_CALLBACK m_connectionHandler(
void *userdata,
80 vrpn_ConnectionPtr m_vrpnConnection;
81 std::vector<std::function<void()> > m_connectionHandlers;
87 #endif // INCLUDED_VrpnBasedConnection_h_GUID_49F2C30F_D807_43B1_A754_9B645D3A1809
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
Class wrapping a messaging transport (server or internal) connection.
Definition: Connection.h:56
RAII class wrapping networking system startup.
Definition: NetworkingSupport.h:43
Structure used internally to construct the desired type of device.
Definition: DeviceInitObject.h:59
Definition: VrpnBasedConnection.h:45
const char * vrpnPing()
Return the string identifying VRPN ping messages.
Definition: VrpnBasedConnection.cpp:42
unique_ptr< MessageType > MessageTypePtr
a uniquely-owned handle for holding a message type registration.
Definition: MessageTypePtr.h:42
shared_ptr< ConnectionDevice > ConnectionDevicePtr
How to hold on to a ConnectionDevice.
Definition: ConnectionDevicePtr.h:40