orca-robotics


INTRODUCTION
Overview
Download and Install
Documentation

REPOSITORY
Interfaces
Drivers
Libraries
Utilities
Software Map

DEVELOPER
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

humaninput2d.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2008 Alex Brooks, Alexei Makarenko, Tobias Kaupp
00005  *
00006  * This copy of Orca is licensed to you under the terms described in
00007  * the LICENSE file included in this distribution.
00008  *
00009  */
00010 
00011 #ifndef HYDRO_INTERFACES_HUMANINPUT2D_H
00012 #define HYDRO_INTERFACES_HUMANINPUT2D_H
00013 
00014 #include <hydroutil/context.h>
00015 
00016 namespace hydrointerfaces 
00017 {
00018 
00039 class SOEXPORT HumanInput2d
00040 {
00041 
00042 public:
00043 
00057     class SOEXPORT Command
00058     {   
00059     public: 
00061         double longitudinal;
00063         bool isLongIncrement;
00064     
00066         double transverse;
00068         bool isTransverseIncrement;
00069 
00071         double angular;
00073         bool isAngularIncrement;
00074 
00075         void resetIncremental();
00076         void resetAbsolute();
00077         std::string toString() const;
00078     };
00079 
00080     virtual ~HumanInput2d() {};
00081     
00083     virtual int enable()=0;
00084     
00086     virtual int disable()=0;
00087 
00089     virtual int read( Command& command )=0;
00090 };
00091 
00093 class SOEXPORT HumanInput2dFactory {
00094 public:
00095     virtual ~HumanInput2dFactory() {};
00097     virtual HumanInput2d *createDriver( const hydroutil::Context &context ) const=0;
00098 };
00099 
00101 } // namespace
00102 
00103 // Function for dynamically instantiating drivers.
00104 // A driver must have a function like so:
00105 // extern "C" {
00106 //     hydrointerfaces::HumanInput2dFactory *createDriverFactory();
00107 // }
00108 typedef hydrointerfaces::HumanInput2dFactory *DriverFactoryMakerFunc();
00109 
00110 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5