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);
67 vrpn_uint16 interval = 10000
68 , vrpn_uint16 commandId = 0
83 double keepAliveSeconds = 9.0);
89 vrpn_uint16 interval = 10000
90 , vrpn_uint16 commandId = 0
106 double keepAliveSeconds = 9.0);
124 vrpn_uint16 interval = 10000
125 , vrpn_uint16 commandId = 0
140 double keepAliveSeconds = 9.0)
155 double keepAliveSeconds = 9.0)
vrpn_Analog(const char *name, vrpn_Connection *c=NULL)
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.
vrpn_HidInterface(vrpn_HidAcceptor *acceptor, vrpn_uint16 vendor=0, vrpn_uint16 product=0, hid_device *device=NULL)
Constructor If we already have a HID device from some other source, it can be passed and we'll take o...
virtual void on_data_received(size_t bytes, vrpn_uint8 *buffer)=0
Derived class reimplements this callback.
vrpn_Oculus_DK1(const char *name, vrpn_Connection *c=NULL, double keepAliveSeconds=9.0)
Constructor.
virtual void writeKeepAlive(vrpn_uint16 interval=10000, vrpn_uint16 commandId=0)
vrpn_Oculus_DK2_LEDs(const char *name, vrpn_Connection *c=NULL, double keepAliveSeconds=9.0)
Constructor.
vrpn_Oculus_DK2_inertial(const char *name, vrpn_Connection *c=NULL, double keepAliveSeconds=9.0)
Constructor.
bool d_enableLEDs
Whether to trigger the LEDs.
bool parse_message(std::size_t bytes, vrpn_uint8 *buffer)
vrpn_Oculus_DK2(bool enableLEDs, const char *name, vrpn_Connection *c=NULL, double keepAliveSeconds=9.0)
Protected constructor so you can't instantiate this base class.
virtual void writeKeepAlive(vrpn_uint16 interval=10000, vrpn_uint16 commandId=0)
void parse_message_type_11(std::size_t bytes, vrpn_uint8 *buffer)
Parse and send reports for type-11 message.
void parse_message_type_1(std::size_t bytes, vrpn_uint8 *buffer)
Parse and send reports for type-1 message.
struct timeval d_lastKeepAlive
vrpn_Oculus(vrpn_uint16 product_id, vrpn_uint8 num_channels, const char *name, vrpn_Connection *c=NULL, double keepAliveSeconds=9.0)
Protected constructor so you can't instantiate this base class.
double d_keepAliveSeconds
How often to send the keepAlive message to the Rift (triggers the LEDs if available)
vrpn_HidAcceptor * m_filter
struct timeval d_timestamp
Timestamp updated during mainloop()
virtual bool parse_message(std::size_t bytes, vrpn_uint8 *buffer)
virtual void writeKeepAlive(vrpn_uint16 interval=10000, vrpn_uint16 commandId=0)=0