vrpn 07.35
Virtual Reality Peripheral Network
 
Loading...
Searching...
No Matches
vrpn_Laputa.h
Go to the documentation of this file.
1
8
9// Based on vrpn_Oculus driver
10
11#pragma once
12
13#include "vrpn_HumanInterface.h"
14#include "vrpn_Analog.h"
15
16#if defined(VRPN_USE_HID)
17
20public:
26 vrpn_Laputa(const char *name, vrpn_Connection *c = NULL);
27
31 virtual ~vrpn_Laputa();
32
33 virtual void mainloop();
34
35protected:
36 //-------------------------------------------------------------
37 // Parsers for different report types.
38 // Override to define more parsers
39 virtual bool parse_message(std::size_t bytes, vrpn_uint8 *buffer);
40
41 //-------------------------------------------------------------
42 // Parsers for different report types. The Laputa Hero sends type-1
43 // reports in response to inertial-only keep-alive messages
44 //
46 void parse_message_type_1(std::size_t bytes, vrpn_uint8 *buffer);
47
50 void on_data_received(std::size_t bytes, vrpn_uint8 *buffer);
51
53 struct timeval d_timestamp;
54};
55
56#endif // VRPN_USE_HID
vrpn_Analog(const char *name, vrpn_Connection *c=NULL)
Definition vrpn_Analog.C:14
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_Laputa(const char *name, vrpn_Connection *c=NULL)
Definition vrpn_Laputa.C:25
virtual bool parse_message(std::size_t bytes, vrpn_uint8 *buffer)
struct timeval d_timestamp
Timestamp updated during mainloop()
Definition vrpn_Laputa.h:53
void parse_message_type_1(std::size_t bytes, vrpn_uint8 *buffer)
Parse and send reports for type-1 message.
Definition vrpn_Laputa.C:82
#define VRPN_API