vrpn
07.35
Virtual Reality Peripheral Network
Toggle main menu visibility
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
19
class
VRPN_API
vrpn_Laputa
:
public
vrpn_Analog
,
protected
vrpn_HidInterface
{
20
public
:
26
vrpn_Laputa
(
const
char
*name,
vrpn_Connection
*c = NULL);
27
31
virtual
~vrpn_Laputa
();
32
33
virtual
void
mainloop
();
34
35
protected
:
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::vrpn_Analog
vrpn_Analog(const char *name, vrpn_Connection *c=NULL)
Definition
vrpn_Analog.C:14
vrpn_BaseClass::mainloop
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
vrpn_Connection
Generic connection class not specific to the transport mechanism.
Definition
vrpn_Connection.h:561
vrpn_HidInterface::vrpn_HidInterface
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...
Definition
vrpn_HumanInterface.C:50
vrpn_HidInterface::on_data_received
virtual void on_data_received(size_t bytes, vrpn_uint8 *buffer)=0
Derived class reimplements this callback.
vrpn_Laputa::vrpn_Laputa
vrpn_Laputa(const char *name, vrpn_Connection *c=NULL)
Definition
vrpn_Laputa.C:25
vrpn_Laputa::parse_message
virtual bool parse_message(std::size_t bytes, vrpn_uint8 *buffer)
Definition
vrpn_Laputa.C:162
vrpn_Laputa::d_timestamp
struct timeval d_timestamp
Timestamp updated during mainloop().
Definition
vrpn_Laputa.h:53
vrpn_Laputa::parse_message_type_1
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
vrpn_Analog.h
VRPN_API
#define VRPN_API
Definition
vrpn_Configure.h:648
vrpn_HumanInterface.h
vrpn_Laputa.h
Generated by
1.17.0