#ifndef VRPN_MAGELLAN_H
#define VRPN_MAGELLAN_H
#include "vrpn_Connection.h"
#include "vrpn_Analog.h"
#include "vrpn_Button.h"
class vrpn_Magellan: public vrpn_Serial_Analog
,public vrpn_Button
{
public:
vrpn_Magellan (const char * name, vrpn_Connection * c,
const char * port, int baud);
~vrpn_Magellan () {};
virtual void mainloop ();
virtual int reset(void);
protected:
int _status;
int _numbuttons;
int _numchannels;
int _expected_chars;
unsigned char _buffer[512];
int _bufcount;
int _null_radius;
struct timeval timestamp;
virtual void clear_values(void);
virtual int get_report(void);
virtual void report_changes
(vrpn_uint32 class_of_service
= vrpn_CONNECTION_LOW_LATENCY);
virtual void report
(vrpn_uint32 class_of_service
= vrpn_CONNECTION_LOW_LATENCY);
// NOTE: class_of_service is only applied to vrpn_Analog
// values, not vrpn_Button, which are always vrpn_RELIABLE
};
#endif