vrpn 07.35
Virtual Reality Peripheral Network
 
Loading...
Searching...
No Matches
vrpn_Event_Analog.h
Go to the documentation of this file.
1/**************************************************************************************************/
2/* */
3/* Copyright (C) 2004 Bauhaus University Weimar */
4/* Released into the public domain on 6/23/2007 as part of the VRPN project */
5/* by Jan P. Springer. */
6/* */
7/**************************************************************************************************/
8/* */
9/* module : vrpn_Event_Analog.h */
10/* project : */
11/* description: base class for devices using event interface */
12/* */
13/**************************************************************************************************/
14
15#ifndef _VRPN_EVENT_ANALOG_H_
16#define _VRPN_EVENT_ANALOG_H_
17
18// includes, system
19#include <vector> // for vector
20
21// includes, project
22#include "vrpn_Analog.h" // for vrpn_Analog
23#include "vrpn_Configure.h" // for VRPN_API
24#include "vrpn_Event.h" // for input_event
25
27
29
30public:
31
32 // constructor
33 // evdev is the event file name
34 vrpn_Event_Analog( const char * name,
35 vrpn_Connection * connection,
36 const char * evdev_name);
37
39
40protected:
41
42 // read available events
43 // returns number of structs read successfully
45
46protected:
47
48 // typedefs for convenience
49 typedef std::vector<struct vrpn_Event::input_event> event_vector_t;
50 typedef event_vector_t::iterator event_iter_t;
51
52 // handle to the event interface
53 int fd;
54
55 // maximal number of event structs read at once
56 unsigned long max_num_events;
57
58 // container for the event structs read
60
61};
62
63#endif // _VRPN_EVENT_ANALOG_H_
vrpn_Analog(const char *name, vrpn_Connection *c=NULL)
Definition vrpn_Analog.C:14
Generic connection class not specific to the transport mechanism.
vrpn_Event_Analog(const char *name, vrpn_Connection *connection, const char *evdev_name)
event_vector_t event_data
event_vector_t::iterator event_iter_t
std::vector< struct vrpn_Event::input_event > event_vector_t
unsigned long max_num_events
#define VRPN_API
class VRPN_API vrpn_Connection