Main Page   Class Hierarchy   Compound List   File List   Header Files   Compound Members   File Members  

vrpn_Analog_5dt.h

This is the verbatim text of the vrpn_Analog_5dt.h include file.
#ifndef VRPN_5DT_H
#define VRPN_5DT_H

#include "vrpn_Connection.h"
#include "vrpn_Analog.h"

class vrpn_5dt: public vrpn_Serial_Analog
{
public:
        vrpn_5dt (const char * name,
                  vrpn_Connection * c,
                  const char * port,
                  int baud = 19200,
                  int mode = 1);

        ~vrpn_5dt () {};

        virtual void mainloop ();
        
        void syncing (void);

  protected:
        int _status;                //< Reset, Syncing, or Reading
        int _numchannels;           //< How many analog channels to open
        int _mode ;                  //< glove mode for reporting data (see glove manual)
        int _expected_chars;        //< How many characters to expect in the report
        unsigned char _buffer[512]; //< Buffer of characters in report
        int _bufcount;              //< How many characters we have so far

        struct timeval timestamp;   //< Time of the last report from the device

        virtual int reset(void);                //< Set device back to starting config
        virtual void get_report(void);          //< Try to read a report from the device

        virtual void clear_values(void);        //< Clears all channels to 0

        int send_command(const unsigned char *cmd, int len);

        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);
};

#endif

Generated at Fri Sep 13 15:03:54 2002 for vrpn by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999