Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

P_VRPNButtons.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *cr                                                                       
00003  *cr            (C) Copyright 1995-2019 The Board of Trustees of the           
00004  *cr                        University of Illinois                       
00005  *cr                         All Rights Reserved                        
00006  *cr                                                                   
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  * RCS INFORMATION:
00011  *
00012  *      $RCSfile: P_VRPNButtons.h,v $
00013  *      $Author: johns $        $Locker:  $             $State: Exp $
00014  *      $Revision: 1.27 $       $Date: 2019/01/17 21:21:01 $
00015  *
00016  ***************************************************************************
00017  * DESCRIPTION:
00018  * This is Paul's new Tracker code -- pgrayson@ks.uiuc.edu
00019  *
00020  * This is a Buttons that gets its info over the net from VRPN.
00021  *
00022  ***************************************************************************/
00023 
00024 #ifndef P_VRPN_BUTTONS_H
00025 #define P_VRPN_BUTTONS_H
00026 
00027 #if defined(VMDVRPN)
00028 
00029 #include "P_Buttons.h"
00030 #include "vrpn_Button.h"
00031 #include "ResizeArray.h"
00032 
00034 class VRPNButtons : public Buttons {
00035 private:
00036   vrpn_Button_Remote *btn; 
00037 
00038 protected:
00039   virtual int do_start(const SensorConfig *);
00040 
00041 public:
00042   VRPNButtons();
00043   ~VRPNButtons();
00044   
00045   virtual const char *device_name() const { return "vrpnbuttons"; }
00046   virtual Buttons *clone() { return new VRPNButtons; }
00047 
00048   virtual void update();
00049 
00050   inline virtual int alive() {
00051     if(btn) if(btn->connectionPtr())
00052       return btn->connectionPtr()->doing_okay();
00053     return 0;
00054   }
00055 };
00056 
00057 #endif
00058 
00059 #endif

Generated on Tue Dec 10 02:46:09 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002