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

ArGripper.h

00001 /*
00002 MobileRobots Advanced Robotics Interface for Applications (ARIA)
00003 Copyright (C) 2004, 2005 ActivMedia Robotics LLC
00004 Copyright (C) 2006, 2007 MobileRobots Inc.
00005 
00006      This program is free software; you can redistribute it and/or modify
00007      it under the terms of the GNU General Public License as published by
00008      the Free Software Foundation; either version 2 of the License, or
00009      (at your option) any later version.
00010 
00011      This program is distributed in the hope that it will be useful,
00012      but WITHOUT ANY WARRANTY; without even the implied warranty of
00013      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014      GNU General Public License for more details.
00015 
00016      You should have received a copy of the GNU General Public License
00017      along with this program; if not, write to the Free Software
00018      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 
00020 If you wish to redistribute ARIA under different terms, contact 
00021 MobileRobots for information about a commercial version of ARIA at 
00022 robots@mobilerobots.com or 
00023 MobileRobots Inc, 19 Columbia Drive, Amherst, NH 03031; 800-639-9481
00024 */
00025 
00026 #ifndef ARGRIPPER_H
00027 #define ARGRIPPER_H
00028 
00029 #include "ariaTypedefs.h"
00030 #include "ArRobot.h"
00031 
00033 
00040 class ArGripperCommands
00041 {
00042 public:
00043   enum Commands {
00044     GRIP_OPEN = 1, 
00045     GRIP_CLOSE = 2, 
00046     GRIP_STOP = 3, 
00047     LIFT_UP = 4, 
00048     LIFT_DOWN = 5, 
00049     LIFT_STOP = 6, 
00050     GRIPPER_STORE = 7, 
00054     GRIPPER_DEPLOY = 8, 
00059     GRIPPER_HALT = 15, 
00060     GRIP_PRESSURE = 16, 
00065     LIFT_CARRY = 17 
00070   };
00071 };
00072 
00074 class ArGripper
00075 {
00076 public:
00078   AREXPORT ArGripper(ArRobot *robot, int gripperType = QUERYTYPE);
00080   AREXPORT virtual ~ArGripper();
00082   AREXPORT bool gripOpen(void);
00084   AREXPORT bool gripClose(void);
00086   AREXPORT bool gripStop(void);
00088   AREXPORT bool liftUp(void);
00090   AREXPORT bool liftDown(void);
00092   AREXPORT bool liftStop(void);
00094   AREXPORT bool gripperStore(void);
00096   AREXPORT bool gripperDeploy(void);
00098   AREXPORT bool gripperHalt(void);
00100   AREXPORT bool gripPressure(int mSecIntervals);
00102   AREXPORT bool liftCarry(int mSecIntervals);
00104   AREXPORT bool isGripMoving(void) const;
00106   AREXPORT bool isLiftMoving(void) const;
00108   AREXPORT int getGripState(void) const;
00110   AREXPORT int getPaddleState(void) const;
00112   AREXPORT int getBreakBeamState(void) const;
00114   AREXPORT bool isLiftMaxed(void) const;
00116   AREXPORT int getType(void) const;
00118   AREXPORT void setType(int type);
00120   AREXPORT long getMSecSinceLastPacket(void) const;
00122   AREXPORT int getGraspTime(void) const;
00124   AREXPORT void logState(void) const;
00126   AREXPORT bool packetHandler(ArRobotPacket *packet);
00128   AREXPORT void connectHandler(void);
00130   enum Type {
00131     QUERYTYPE, 
00132     GENIO, 
00133     USERIO, 
00134     GRIPPAC, 
00135     NOGRIPPER 
00136   }; 
00137 protected:
00138   ArRobot *myRobot;
00139   int myType;
00140   unsigned char myState;
00141   unsigned char mySwitches;
00142   unsigned char myGraspTime;
00143   ArTime myLastDataTime;
00144   ArFunctorC<ArGripper> myConnectCB;
00145   ArRetFunctor1C<bool, ArGripper, ArRobotPacket *> myPacketHandlerCB;
00146 };
00147 
00148 
00149 #endif // ARGRIPPER_H

Generated on Tue Feb 20 10:51:40 2007 for Aria by  doxygen 1.4.0