12#ifndef VRPN_CLIENT_ONLY
16#define vrpn_CHANNEL_MAX 128
35 vrpn_int32 getNumChannels(
void)
const;
41 struct timeval timestamp;
49 virtual vrpn_int32 encode_to(
char *buf);
62#ifndef VRPN_CLIENT_ONLY
66 const char *port,
int baud = 9600,
int bits = 8,
68 bool rts_flow =
false);
75 unsigned char buffer[1024];
122 vrpn_int32 setNumChannels(vrpn_int32 sizeRequested);
142 int setClipValues(
int channel,
double min,
double lowzero,
double highzero,
148 int setChannelValue(
int channel,
double value);
168typedef struct _vrpn_ANALOGCB {
169 struct timeval msg_time;
195 return d_callback_list.register_handler(userdata, handler);
200 return d_callback_list.unregister_handler(userdata, handler);
vrpn_Callback_List< vrpn_ANALOGCB > d_callback_list
virtual int unregister_change_handler(void *userdata, vrpn_ANALOGCHANGEHANDLER handler)
virtual int register_change_handler(void *userdata, vrpn_ANALOGCHANGEHANDLER handler)
vrpn_float64 * channels(void)
Exposes an array of values for the user to write into.
virtual void mainloop()
For this server, the user must normally call report() or report_changes() directly....
void server_mainloop(void)
Handles functions that all servers should provide in their mainloop() (ping/pong, for example) Should...
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.
Analog server that can scale and clip its range to -1..1.
Generic connection class not specific to the transport mechanism.
int read_available_characters(char *buffer, int bytes)
This structure is what is passed to a vrpn_Connection message callback.
const int vrpn_ANALOG_FAIL
const struct timeval vrpn_ANALOG_NOW
const int vrpn_ANALOG_REPORT_READY
void(VRPN_CALLBACK * vrpn_ANALOGCHANGEHANDLER)(void *userdata, const vrpn_ANALOGCB info)
const int vrpn_ANALOG_RESETTING
const int vrpn_ANALOG_PARTIAL
const int vrpn_ANALOG_SYNCING
All types of client/server/peer objects in VRPN should be derived from the vrpn_BaseClass type descri...
const vrpn_uint32 vrpn_CONNECTION_LOW_LATENCY
vrpn_Serial: Pulls all the serial port routines into one file to make porting to new operating system...
class VRPN_API vrpn_Clipping_Analog_Server