vrpn
07.35
Virtual Reality Peripheral Network
Toggle main menu visibility
Loading...
Searching...
No Matches
vrpn_raw_sgibox.h
Go to the documentation of this file.
1
/* vrpn_raw_sgibox.h
2
*
3
* This file describes the interface to an SGI dial & button box that
4
* is connected through a serial interface. This allows the control of
5
* the boxes without going through the SGI GL library, rather using the
6
* serial interface to connect with the device.
7
*/
8
9
#ifndef VRPN_RAW_SGIBOX
10
#define VRPN_RAW_SGIBOX
11
12
#include "
vrpn_Configure.h
"
// for VRPN_API
13
14
#include "
vrpn_Analog.h
"
15
#include "
vrpn_Dial.h
"
16
#include "
vrpn_Button.h
"
17
18
class
VRPN_API
vrpn_Connection
;
19
20
/* Number of buttons and number of dials on sgi button/dial boxes */
21
#define vrpn_SGI_NUM_BUTTONS (32)
22
#define vrpn_SGI_NUM_DIALS (8)
23
#define vrpn_SGI_NUMDEVS (vrpn_SGI_NUM_BUTTONS+vrpn_SGI_NUM_DIALS)
24
25
class
VRPN_API
vrpn_raw_SGIBox
:
public
vrpn_Analog
,
public
vrpn_Dial
,
public
vrpn_Button_Filter
{
26
public
:
27
vrpn_raw_SGIBox
(
char
* name,
vrpn_Connection
* c,
char
*serialDevName);
28
void
mainloop
();
29
int
reset
();
30
int
send_light_command
();
31
32
protected
:
33
void
get_report
();
34
void
check_press_bank
(
int
base_button,
unsigned
char
base_command,
35
unsigned
char
command);
36
void
check_release_bank
(
int
base_button,
unsigned
char
base_command,
37
unsigned
char
command);
38
39
private
:
40
int
serialfd;
// Serial port that has been opened
41
int
mid_values[
vrpn_SGI_NUM_DIALS
];
//< Used to perform clamping
42
int
last_values[
vrpn_SGI_NUM_DIALS
];
//< Used by dial reporting code
43
};
44
45
#endif
// VRPN_RAW_SGIBOX
46
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_Button_Filter::vrpn_Button_Filter
vrpn_Button_Filter(const char *, vrpn_Connection *c=NULL)
Definition
vrpn_Button.C:129
vrpn_Connection
Generic connection class not specific to the transport mechanism.
Definition
vrpn_Connection.h:561
vrpn_Dial::vrpn_Dial
vrpn_Dial(const char *name, vrpn_Connection *c=NULL)
Definition
vrpn_Dial.C:8
vrpn_raw_SGIBox::reset
int reset()
Definition
vrpn_raw_sgibox.C:77
vrpn_raw_SGIBox::get_report
void get_report()
Definition
vrpn_raw_sgibox.C:230
vrpn_raw_SGIBox::check_press_bank
void check_press_bank(int base_button, unsigned char base_command, unsigned char command)
Definition
vrpn_raw_sgibox.C:205
vrpn_raw_SGIBox::vrpn_raw_SGIBox
vrpn_raw_SGIBox(char *name, vrpn_Connection *c, char *serialDevName)
Definition
vrpn_raw_sgibox.C:48
vrpn_raw_SGIBox::check_release_bank
void check_release_bank(int base_button, unsigned char base_command, unsigned char command)
Definition
vrpn_raw_sgibox.C:215
vrpn_raw_SGIBox::send_light_command
int send_light_command()
Definition
vrpn_raw_sgibox.C:350
vrpn_Analog.h
vrpn_Button.h
vrpn_Configure.h
VRPN_API
#define VRPN_API
Definition
vrpn_Configure.h:648
vrpn_Dial.h
vrpn_SGI_NUM_DIALS
#define vrpn_SGI_NUM_DIALS
Definition
vrpn_raw_sgibox.h:22
vrpn_Connection
class VRPN_API vrpn_Connection
Definition
vrpn_raw_sgibox.h:18
vrpn_raw_sgibox.h
Generated by
1.17.0