vrpn  07.33
Virtual Reality Peripheral Network
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 
30 public:
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 
40 protected:
41 
42  // read available events
43  // returns number of structs read successfully
44  int read_available_data();
45 
46 protected:
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
57 
58  // container for the event structs read
60 
61 };
62 
63 #endif // _VRPN_EVENT_ANALOG_H_
Generic connection class not specific to the transport mechanism.
#define VRPN_API
event_vector_t event_data
std::vector< struct vrpn_Event::input_event > event_vector_t
event_vector_t::iterator event_iter_t