INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

NONFRAMEWORK CODE
Driver Interfaces
Drivers
Libraries
Utilities

FRAMEWORK CODE
Interfaces
Components
Libraries
Utilities

Full Software Listings

DEVELOPER
Tutorials
Examples
Dev Guide
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-2009 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 
00044     static const int TIMEOUT=-2;
00045 
00059     class SOEXPORT Command
00060     {   
00061     public: 
00063         double longitudinal;
00065         bool isLongIncrement;
00066     
00068         double transverse;
00070         bool isTransverseIncrement;
00071 
00073         double angular;
00075         bool isAngularIncrement;
00076 
00077         void resetIncremental();
00078         void resetAbsolute();
00079         std::string toString() const;
00080     };
00081 
00082     virtual ~HumanInput2d() {};
00083     
00085     virtual int enable()=0;
00086     
00088     virtual int disable()=0;
00089 
00092     virtual int read( Command& command )=0;
00093 };
00094 
00096 class SOEXPORT HumanInput2dFactory {
00097 public:
00098     virtual ~HumanInput2dFactory() {};
00100     virtual HumanInput2d *createDriver( const hydroutil::Context &context ) const=0;
00101 };
00102 
00104 } // namespace
00105 
00106 // Function for dynamically instantiating drivers.
00107 // A driver must have a function like so:
00108 // extern "C" {
00109 //     hydrointerfaces::HumanInput2dFactory *createHumanInput2dDriverFactory();
00110 // }
00111 typedef hydrointerfaces::HumanInput2dFactory *HumanInput2dDriverFactoryMakerFunc();
00112 
00113 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5