18#if defined(VRPN_USE_HID)
40 vrpn_Oculus(vrpn_uint16 product_id, vrpn_uint8 num_channels,
41 const char *name,
vrpn_Connection *c = NULL,
double keepAliveSeconds = 9.0);
48 virtual bool parse_message(std::size_t bytes, vrpn_uint8 *buffer);
51 void parse_message_type_1(std::size_t bytes, vrpn_uint8 *buffer);
58 struct timeval d_timestamp;
63 struct timeval d_lastKeepAlive;
67 vrpn_uint16 interval = 10000
68 , vrpn_uint16 commandId = 0
83 double keepAliveSeconds = 9.0);
88 virtual void writeKeepAlive(
89 vrpn_uint16 interval = 10000
90 , vrpn_uint16 commandId = 0
106 double keepAliveSeconds = 9.0);
114 bool parse_message(std::size_t bytes, vrpn_uint8 *buffer);
117 void parse_message_type_11(std::size_t bytes, vrpn_uint8 *buffer);
123 virtual void writeKeepAlive(
124 vrpn_uint16 interval = 10000
125 , vrpn_uint16 commandId = 0
140 double keepAliveSeconds = 9.0)
155 double keepAliveSeconds = 9.0)
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
Generic connection class not specific to the transport mechanism.
virtual void on_data_received(size_t bytes, vrpn_uint8 *buffer)=0
Derived class reimplements this callback.
Oculus Rift DK1 head-mounted display.
Oculus Rift DK2 head-mounted display (LEDs enabled)
vrpn_Oculus_DK2_LEDs(const char *name, vrpn_Connection *c=NULL, double keepAliveSeconds=9.0)
Constructor.
Oculus Rift DK2 head-mounted display (inertial measurement unit only)
vrpn_Oculus_DK2_inertial(const char *name, vrpn_Connection *c=NULL, double keepAliveSeconds=9.0)
Constructor.
Oculus Rift DK2 head-mounted display base class for both intertial- only and LED-enabled version.
bool d_enableLEDs
Whether to trigger the LEDs.
Oculus Rift head-mounted display base class.
double d_keepAliveSeconds
How often to send the keepAlive message to the Rift (triggers the LEDs if available)
vrpn_HidAcceptor * m_filter
virtual void writeKeepAlive(vrpn_uint16 interval=10000, vrpn_uint16 commandId=0)=0