vrpn
07.33
Virtual Reality Peripheral Network
|
Go to the documentation of this file.
38 virtual void set_momentary(vrpn_int32 which_button);
39 virtual void set_toggle(vrpn_int32 which_button, vrpn_int32 current_state);
40 virtual void set_all_momentary(
void);
41 virtual void set_all_toggle(vrpn_int32 default_state);
47 vrpn_int32 num_buttons;
48 struct timeval timestamp;
54 virtual void report_changes(
void);
55 virtual void report_states(
void);
56 virtual vrpn_int32 encode_to(
char *buf, vrpn_int32 button,
58 virtual vrpn_int32 encode_states_to(
char *buf);
69 virtual void set_toggle(vrpn_int32 which_button, vrpn_int32 current_state);
72 void set_alerts(vrpn_int32);
89 #ifndef VRPN_CLIENT_ONLY
104 int number_of_buttons(
void);
111 int set_button(
int button,
int new_value);
123 int numbuttons = 1, vrpn_float64 rate = 1.0);
139 int portno,
unsigned porthex = 0);
148 int openGiveIO(
void);
168 virtual void read(
void);
176 const char *port =
"/dev/ttyS1/",
long baud = 38400);
200 const char *port =
"/dev/ttyS1/",
long baud = 38400);
208 report_no_timestamp();
211 #endif // VRPN_CLIENT_ONLY
222 #define VRPN_BUTTON_OFF (0)
223 #define VRPN_BUTTON_ON (1)
225 typedef struct _vrpn_BUTTONCB {
226 struct timeval msg_time;
238 typedef struct _vrpn_BUTTONSTATECB {
239 struct timeval msg_time;
265 return d_callback_list.register_handler(userdata, handler);
270 return d_callback_list.unregister_handler(userdata, handler);
277 return d_states_callback_list.register_handler(userdata, handler);
282 return d_states_callback_list.unregister_handler(userdata, handler);
295 #define VRPN_BUTTON_H
This structure is what is passed to a vrpn_Connection message callback.
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
Generic connection class not specific to the transport mechanism.
virtual int register_types(void)=0
Register the types of messages this device sends/receives. Return 0 on success, -1 on fail.
class VRPN_API vrpn_Button_Server
Class from which all user-level (and other) classes that communicate with vrpn_Connections should der...