32 virtual vrpn_int32
encode_to(
char *buf, vrpn_int32 buflen, vrpn_int32 dial,
52 vrpn_int32 numdials = 1,
53 vrpn_float64 spin_rate = 1.0,
54 vrpn_float64 update_rate = 10.0);
73typedef struct _vrpn_DIALCB {
vrpn_MESSAGEHANDLER handler
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.
vrpn_BaseClass(const char *name, vrpn_Connection *c=NULL)
Names the device and assigns or opens connection, calls registration methods.
Generic connection class not specific to the transport mechanism.
vrpn_Dial_Example_Server(const char *name, vrpn_Connection *c, vrpn_int32 numdials=1, vrpn_float64 spin_rate=1.0, vrpn_float64 update_rate=10.0)
vrpn_float64 _update_rate
vrpn_Callback_List< vrpn_DIALCB > d_callback_list
virtual int register_change_handler(void *userdata, vrpn_DIALCHANGEHANDLER handler)
virtual int unregister_change_handler(void *userdata, vrpn_DIALCHANGEHANDLER handler)
vrpn_Dial_Remote(const char *name, vrpn_Connection *c=NULL)
static int VRPN_CALLBACK handle_change_message(void *userdata, vrpn_HANDLERPARAM p)
virtual void report_changes(void)
vrpn_float64 dials[vrpn_DIAL_MAX]
virtual void report(void)
vrpn_Dial(const char *name, vrpn_Connection *c=NULL)
virtual vrpn_int32 encode_to(char *buf, vrpn_int32 buflen, vrpn_int32 dial, vrpn_float64 delta)
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_Connection
void(VRPN_CALLBACK * vrpn_DIALCHANGEHANDLER)(void *userdata, const vrpn_DIALCB info)