11#ifndef VRPN_ANALOG_OUTPUT_H
12#define VRPN_ANALOG_OUTPUT_H
38 struct timeval o_timestamp;
67 vrpn_int32 setNumChannels(vrpn_int32 sizeRequested);
70 const vrpn_float64*
o_channels(
void)
const {
return o_channel; };
73 virtual bool report_num_channels(
75 virtual vrpn_int32 encode_num_channels_to(
char* buf, vrpn_int32 num);
104typedef struct _vrpn_ANALOGOUTPUTCB {
105 struct timeval msg_time;
129 return d_callback_list.register_handler(userdata, handler);
135 return d_callback_list.unregister_handler(userdata, handler);
167 virtual bool request_change_channel_value(
168 unsigned int chan, vrpn_float64 val,
177 virtual bool request_change_channels(
178 int num, vrpn_float64* vals,
187 virtual vrpn_int32 encode_change_to(
char* buf, vrpn_int32 chan,
189 virtual vrpn_int32 encode_change_channels_to(
char* buf, vrpn_int32 num,
vrpn_Callback_List< vrpn_ANALOGOUTPUTCB > d_callback_list
List of user-level routines that need to be called back to let them know that the values have changed...
virtual int unregister_change_handler(void *userdata, vrpn_ANALOGOUTPUTCHANGEHANDLER handler)
virtual int register_change_handler(void *userdata, vrpn_ANALOGOUTPUTCHANGEHANDLER handler)
virtual void mainloop()
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
const vrpn_float64 * o_channels(void) const
Exposes an array of values for the user to read from.
vrpn_int32 got_connection_m_id
vrpn_int32 report_num_channels_m_id
vrpn_int32 request_channels_m_id
vrpn_int32 getNumChannels() const
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.
Generic connection class not specific to the transport mechanism.
const vrpn_float64 * channel
This structure is what is passed to a vrpn_Connection message callback.
void(VRPN_CALLBACK * vrpn_ANALOGOUTPUTCHANGEHANDLER)(void *userdata, const vrpn_ANALOGOUTPUTCB info)
All types of client/server/peer objects in VRPN should be derived from the vrpn_BaseClass type descri...
const vrpn_uint32 vrpn_CONNECTION_RELIABLE
Classes of service for messages, specify multiple by ORing them together Priority of satisfying these...