vrpn 07.35
Virtual Reality Peripheral Network
 
Loading...
Searching...
No Matches
vrpn_sgibox.h
Go to the documentation of this file.
1#ifndef VRPN_SGIBOX
2#define VRPN_SGIBOX
3
4#ifdef sgi
5
6#include "vrpn_Analog.h"
7#include "vrpn_Button.h"
8// Do we really need this here as everything is already
9// surrounded by #ifdef sgi...???
10#ifndef _WIN32
11#include <netinet/in.h>
12#include <sys/ioctl.h>
13#endif
14#ifndef MICROSCAPE_H
15#include <gl/gl.h>
16#include <gl/device.h>
17#endif
18
19/* Number of buttons and number of dials on sgi button/dial boxes */
20#define NUM_BUTTONS (32)
21#define NUM_DIALS (8)
22#define NUMDEVS (NUM_BUTTONS+NUM_DIALS)
23
24class VRPN_API vrpn_SGIBox :public vrpn_Analog, public vrpn_Button_Filter {
25public:
26 vrpn_SGIBox(char * name, vrpn_Connection * c);
27 void mainloop();
28 void reset();
29
30
31protected:
32 void get_report();
33
34
35private:
36 double resetval[vrpn_CHANNEL_MAX];
38
39 unsigned long btstat; /* status of of on/off buttons */
40 unsigned long bs1, bs2; /* status of all buttons */
41 unsigned long *bpA, *bpB, *bpT; /* ptrs to above */
42 Device devs[NUMDEVS]; /* device array */
43 short vals1[NUMDEVS],
44 vals2[NUMDEVS]; /* two values arrays */
45 int dial_changed[NUM_DIALS];
46 int mid_values[NUM_DIALS];
47 int winid;
48 int sid;// server id;
49};
50
51#endif // sgi
52
53#endif // VRPN_SGIBOX
54
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
All button servers should derive from this class, which provides the ability to turn any of the butto...
Definition vrpn_Button.h:66
#define MAX_TIME_INTERVAL
class VRPN_API vrpn_Connection
Definition vrpn_3Space.h:7
#define vrpn_CHANNEL_MAX
Definition vrpn_Analog.h:16
#define VRPN_API