39 virtual void set_momentary(vrpn_int32 which_button);
40 virtual void set_toggle(vrpn_int32 which_button, vrpn_int32 current_state);
41 virtual void set_all_momentary(
void);
42 virtual void set_all_toggle(vrpn_int32 default_state);
49 struct timeval timestamp;
55 virtual void report_changes(
void);
56 virtual void report_states(
void);
57 virtual vrpn_int32 encode_to(
char *buf, vrpn_int32 button,
59 virtual vrpn_int32 encode_states_to(
char *buf);
69 virtual void set_momentary(vrpn_int32 which_button);
70 virtual void set_toggle(vrpn_int32 which_button, vrpn_int32 current_state);
71 virtual void set_all_momentary(
void);
72 virtual void set_all_toggle(vrpn_int32 default_state);
73 void set_alerts(vrpn_int32);
80 virtual vrpn_int32 encode_states_to(
char *buf);
81 virtual void report_changes(
void);
90#ifndef VRPN_CLIENT_ONLY
105 int number_of_buttons(
void);
112 int set_button(
int button,
int new_value);
124 int numbuttons = 1, vrpn_float64 rate = 1.0);
140 int portno,
unsigned porthex = 0);
149 int openGiveIO(
void);
169 virtual void read(
void);
177 const char *port =
"/dev/ttyS1/",
long baud = 38400);
201 const char *port =
"/dev/ttyS1/",
long baud = 38400);
209 report_no_timestamp();
223#define VRPN_BUTTON_OFF (0)
224#define VRPN_BUTTON_ON (1)
226typedef struct _vrpn_BUTTONCB {
227 struct timeval msg_time;
239typedef struct _vrpn_BUTTONSTATECB {
240 struct timeval msg_time;
266 return d_callback_list.register_handler(userdata, handler);
271 return d_callback_list.unregister_handler(userdata, handler);
278 return d_states_callback_list.register_handler(userdata, handler);
283 return d_states_callback_list.unregister_handler(userdata, handler);
Class from which all user-level (and other) classes that communicate with vrpn_Connections should der...
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
virtual int register_types(void)=0
Register the types of messages this device sends/receives. Return 0 on success, -1 on fail.
Generic connection class not specific to the transport mechanism.
This structure is what is passed to a vrpn_Connection message callback.
All types of client/server/peer objects in VRPN should be derived from the vrpn_BaseClass type descri...
class VRPN_API vrpn_Button_Server