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

vrpn_Zaber.h

This is the verbatim text of the vrpn_Zaber.h include file.
#ifndef VRPN_ZABER_H
#define VRPN_ZABER_H

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

class vrpn_Zaber: public vrpn_Serial_Analog, public vrpn_Analog_Output
{
public:
        vrpn_Zaber (const char * name, vrpn_Connection * c,
                        const char * port);

        ~vrpn_Zaber () {};

        virtual void mainloop ();

  protected:
        int _status;                //< Reset, Syncing, or Reading

        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 int get_report(void);           //< Try to read a report from the device

        bool  send_command(unsigned char devicenum, unsigned char cmd, vrpn_int32 data);
        bool  send_command(unsigned char devnum, unsigned char cmd, unsigned char d0,
          unsigned char d1, unsigned char d2, unsigned char d3);
        vrpn_int32  convert_bytes_to_reading(const unsigned char *buf);

        virtual void report_changes
                   (vrpn_uint32 class_of_service = vrpn_CONNECTION_RELIABLE);
        virtual void report
                   (vrpn_uint32 class_of_service = vrpn_CONNECTION_RELIABLE);

      static int handle_request_message(void *userdata, vrpn_HANDLERPARAM p);

      static int handle_connect_message(void *userdata, vrpn_HANDLERPARAM p);
};

#endif

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