Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

PhysicalLinearActuator.h

Go to the documentation of this file.
00001 //////////////////////////////////////////////////////////////////////////////////////////////////
00002 /*! \file PhysicalLinearActuator.h
00003 *  \Header file for PhysicalLinearActuator class
00004 *  \author $Author: bwilliam $
00005 *  \version $Revision: 1.3 $
00006 *  \date    $Date: 2006/06/27 15:27:12 $
00007 *//////////////////////////////////////////////////////////////////////////////////////////////////
00008 /*! 
00009 */
00010 //////////////////////////////////////////////////////////////////////////////////////////////////
00011 
00012 
00013 #ifndef __SSSL_PHYSICALLINEARACTUATOR_H__
00014 #define __SSSL_PHYSICALLINEARACTUATOR_H__
00015 
00016 #include <Base/Actuator.h>
00017 #include <matrix/Matrix.h>
00018 #include <string>
00019 #include <sstream>
00020 
00021 extern "C" {
00022         #include <Hardware/satctl.h>
00023         #include <Hardware/common.h>
00024         }
00025 
00026 #include <iostream.h>
00027 #include <utils/Time.h>
00028 #include <fstream.h>
00029 #include <pthread.h>
00030 
00031 using namespace std;
00032 using namespace O_SESSAME;
00033 
00034 /*! Class to interact with actual linear actuators */
00035 class PhysicalLinearActuator {
00036 public:
00037 
00038     //////////////////////////////////////////////////
00039     // Contructors/Deconstructors                   //
00040     //////////////////////////////////////////////////
00041 
00042         /*! Default Constructor */
00043         PhysicalLinearActuator();
00044 
00045         /*! Default Deconstructor */
00046         ~PhysicalLinearActuator();
00047 
00048     //////////////////////////////////////////////////
00049     // Facilitators                                 //
00050     //////////////////////////////////////////////////
00051 
00052         /*!Will move the linear actuator a desired distance in either direction*/
00053         /*!param_distance double representing the desired travel distance and direction                 (inches)*/
00054         
00055         int TravelDistance(double param_distance); 
00056     
00057         /*!Will move the linear actuator to a desired position*/
00058         /*!param_position double representing the desired position to move to (inches)*/
00059         
00060         int TravelPosition(double param_position);
00061 
00062         /*!Set velocity for the linear actuator*/
00063         /*!velocity represents velocity range from 0-50*/
00064 
00065         int SetVelocity(double velocity);
00066 
00067         /*! Start linear actuator jog*/
00068         
00069         int StartJog(int direction);    
00070 
00071         /*! Stop the linear actuator*/
00072 
00073         int Stop();
00074         
00075         /*! Initialize the linear actuator(s)*/ 
00076    
00077         int Initialize(int action, char *port);
00078 
00079         /*! Deinitialize the linear actuator*/
00080         
00081         int Deinitialize();
00082 
00083 
00084     //////////////////////////////////////////////////
00085     // Inspectors                                   //
00086     //////////////////////////////////////////////////
00087 
00088         /*!gives the current postion of the LinearActuator (inches)*/
00089         double QueryCurrentPosition( );    
00090     
00091         friend class LinearActuator;
00092 private:
00093 int     LinearActuatorDescription;      //lades
00094 char    *SerialNumber;                  //serno
00095 char    *portfn;
00096 int     portfd;
00097 double  UpperLimit;                     //hi_l
00098 double  LowerLimit;                     //lo_l
00099 double  Travel;                         //travel
00100 int     MaxTravelTime;                  //mtt
00101 double  CurrentPosition;                //curpos
00102 double  PositionVelocity;               //posvel
00103 int     PositionAcceleration;           //posacc
00104 int     PositionDeceleration;           //posdec
00105 int     JogVelocity;                    //jogvel
00106 int     JogAcceleration;                //jogacc
00107 double  param_distance;
00108 double  param_position;
00109   la_t  la;
00110    
00111 };
00112 
00113 #endif 
00114 // Do not change the comments below - they will be added automatically by CVS
00115 /*****************************************************************************
00116 *       $Log: PhysicalLinearActuator.h,v $
00117 *       Revision 1.3  2006/06/27 15:27:12  bwilliam
00118 *       Added jog functions. Added port file name and removed references to debug variable in initialization function.
00119 *
00120 *
00121 *
00122 *
00123 *
00124 ****************************************************************************/
00125 

Generated on Wed Sep 5 12:54:23 2007 for DSACSS Operational Code by  doxygen 1.3.9.1