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

 

         

hydrodrivers/hydrohumaninput2dkbdiostream/driver.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 ORCA2_HUMANINPUT2D_KEYBOARD_IOSTREAM_H
00012 #define ORCA2_HUMANINPUT2D_KEYBOARD_IOSTREAM_H
00013 
00014 #include <hydrointerfaces/humaninput2d.h>
00015 
00016 namespace humaninput2dkbdiostream
00017 {
00018 
00019 class Driver : public hydrointerfaces::HumanInput2d
00020 {
00021 public:
00022 
00023     Driver( const hydroutil::Context &context );
00024     virtual ~Driver();
00025 
00026     virtual int enable();
00027     virtual int disable();
00028 
00029     // Blocks untill new data is available
00030     virtual int read( Command& command );
00031 
00032 private:
00033 
00034     hydroutil::Context context_;
00035 };
00036 
00037 // Used for dynamically loading driver
00038 class Factory : public hydrointerfaces::HumanInput2dFactory
00039 {
00040 public:
00041     hydrointerfaces::HumanInput2d *createDriver( 
00042                 const hydroutil::Context &context ) const
00043     {
00044         return new Driver( context );
00045     }
00046 };
00047 
00048 } // namespace
00049 
00050 // Used for dynamically loading driver
00051 extern "C" {
00052     hydrointerfaces::HumanInput2dFactory *createHumanInput2dDriverFactory();
00053 }
00054 
00055 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5