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 {
43 const char *vrpnPing();
47 enum ConnectionType { VRPN_LOCAL_ONLY, VRPN_SHARED, VRPN_LOOPBACK };
55 boost::optional<int> port);
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
VrpnBasedConnection(ConnectionType type)
Constructor for the VRPN connection.
virtual ~VrpnBasedConnection()
Class wrapping a messaging transport (server or internal) connection.
RAII class wrapping networking system startup.
Structure used internally to construct the desired type of device.
unique_ptr< MessageType > MessageTypePtr
a uniquely-owned handle for holding a message type registration.
virtual const char * getConnectionKindID()
Returns some implementation-defined string based on the dynamic type of the connection.
shared_ptr< ConnectionDevice > ConnectionDevicePtr
How to hold on to a ConnectionDevice.
virtual void * getUnderlyingObject()
Returns the vrpn_Connection pointer.