bhandext.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           bhandext.h  -  description
00003                              -------------------
00004     begin                : Die Mär 11 2003
00005     copyright            : (C) 2003 by Bernd Roessler
00006     email                : roessler@informatik.uni-hamburg.de
00007  ***************************************************************************/
00008 
00009 #ifndef BHANDEXT_H
00010 #define BHANDEXT_H
00011 
00012 #include <bhand.h>
00013 #include "event_handler.h"
00014 #include <exception>
00015 
00023 struct MotorFeedback
00024 {
00025   char loopFeedbackVel;               
00026   unsigned char loopFeedbackStrain;   
00027   unsigned short loopFeedbackAbsPos;  
00028   char loopFeedbackDeltaPos;          
00029 };
00030 
00035 struct FeedbackBlock
00036 {
00037   MotorFeedback mf[4];             
00038   unsigned short loopFeedbackTemp; 
00039 } ;
00040 
00045 struct MotorControl
00046 {
00047   char loopCtrlVel;               
00048   unsigned char loopCtrlPropGain; 
00049 };
00050 
00055 struct ControlBlock
00056 {
00057   MotorControl mc[4]; 
00058 };
00059 
00060 
00068 class BHandExt : public BHand, public Event_Handler
00069 {
00070 
00071 
00072  public:
00078   BHandExt(const std::string devName);
00079 
00080   ~BHandExt();
00081 
00091   void rtMode(const Motors motors);
00092 
00098   FeedbackBlock send(ControlBlock cb) throw (BHandException);
00099 
00104   FeedbackBlock getFeedbackBlock() throw (BHandException);
00105 
00106   //FeedbackBlock send() throw (BHandException);
00108 
00109  protected:
00110   int lcv, lcvc, lcpg, lfv, lfvc, lfs, lfap, lfdp, lfdpc, lft;
00111   int fbSize;
00112   void send (char* s, int size) throw (BHandException);
00113   void read(char* s) throw (BHandException);
00114   virtual void handle_signal (int) {stop();abort();};
00115   FeedbackBlock receiveFeedbackBlock() throw (BHandException);
00116 
00117 };
00118 
00119 #endif


tams Tim Baier bhandlib v0.25
Generated Wed Aug 16 14:57:09 2006 by doxygen 1.4.7