vrpn
07.33
Virtual Reality Peripheral Network
|
Go to the documentation of this file.
12 #ifndef VRPN_CLIENT_ONLY
16 #define vrpn_CHANNEL_MAX 128
35 vrpn_int32 getNumChannels(
void)
const;
40 vrpn_int32 num_channel;
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);
168 typedef 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_float64 channel[vrpn_CHANNEL_MAX]
const int vrpn_ANALOG_SYNCING
Analog server that can scale and clip its range to -1..1.
const int vrpn_ANALOG_FAIL
virtual void report(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY, const struct timeval time=vrpn_ANALOG_NOW)
Send a report whether something has changed or not (for servers) Optionally, tell what time to stamp ...
int read_available_characters(char *buffer, int bytes)
vrpn_Callback_List< vrpn_ANALOGCB > d_callback_list
vrpn_Serial: Pulls all the serial port routines into one file to make porting to new operating system...
const int vrpn_ANALOG_REPORT_READY
const vrpn_uint32 vrpn_CONNECTION_LOW_LATENCY
class VRPN_API vrpn_Clipping_Analog_Server
const struct timeval vrpn_ANALOG_NOW
const int vrpn_ANALOG_RESETTING
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 ...
virtual int unregister_change_handler(void *userdata, vrpn_ANALOGCHANGEHANDLER handler)
Generic connection class not specific to the transport mechanism.
vrpn_float64 * channels(void)
Exposes an array of values for the user to write into.
virtual int register_types(void)=0
Register the types of messages this device sends/receives. Return 0 on success, -1 on fail.
void(VRPN_CALLBACK * vrpn_ANALOGCHANGEHANDLER)(void *userdata, const vrpn_ANALOGCB info)
const int vrpn_ANALOG_PARTIAL
virtual void mainloop()
For this server, the user must normally call report() or report_changes() directly....
virtual void report_changes(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY, const struct timeval time=vrpn_ANALOG_NOW)
Send a report only if something has changed (for servers) Optionally, tell what time to stamp the val...
virtual int register_change_handler(void *userdata, vrpn_ANALOGCHANGEHANDLER handler)
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...