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/hydrorangerarrayfake/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 distribution is licensed to you under the terms described in
00007  * the LICENSE file included in this distribution.
00008  *
00009  */
00010 
00011 #ifndef HYDRO_RANGERARRAY_FAKE_H
00012 #define HYDRO_RANGERARRAY_FAKE_H
00013 
00014 #include <hydrointerfaces/rangerarray.h>
00015 
00016 namespace rangerarrayfake {
00017 
00018 //
00019 // Bogus ranger array driver, useful for testing the rest of the component.
00020 //
00021 class Driver : public hydrointerfaces::RangerArray
00022 {
00023 
00024 public:
00025 
00026     Driver( const hydroutil::Context &context );
00027     virtual ~Driver();
00028     
00029     // Geometry access
00030     virtual void getDescription( hydrointerfaces::RangerArray::Description &description );
00031 
00032     // Blocks till new data is available
00033     virtual void read( hydrointerfaces::RangerArray::Data &data );
00034 
00035 private:
00036 
00037     // configurable sleep interval before returning from read() [milliseconds]
00038     int sleepIntervalMs_;
00039 
00040     RangerArray::Description description_;
00041     hydroutil::Context context_;
00042 };
00043 
00044 // Used for dynamically loading driver
00045 class Factory : public hydrointerfaces::RangerArrayFactory
00046 {
00047 public:
00048     hydrointerfaces::RangerArray *createDriver( 
00049                 const hydroutil::Context &context ) const
00050     {
00051         return new Driver( context );
00052     }
00053 };
00054 
00055 } // namespace
00056 
00057 // Used for dynamically loading driver
00058 extern "C" {
00059     hydrointerfaces::RangerArrayFactory *createRangerArrayDriverFactory();
00060 }
00061 
00062 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5