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

 

         

laserscanner2dfake/driver.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 distribution is licensed to you under the terms described in
00007  * the LICENSE file included in this distribution.
00008  *
00009  */
00010 
00011 #ifndef HYDRO_LASERSCANNER2D_FAKE_H
00012 #define HYDRO_LASERSCANNER2D_FAKE_H
00013 
00014 #include <hydrointerfaces/laserscanner2d.h>
00015 
00016 namespace laserscanner2dfake {
00017 
00018 //
00019 // Bogus laser driver, useful for testing the rest of the component.
00020 //
00021 class Driver : public hydrointerfaces::LaserScanner2d
00022 {
00023 
00024 public:
00025 
00026     Driver( const Config &cfg, const hydroutil::Context &context );
00027     virtual ~Driver();
00028 
00029     // Blocks till new data is available
00030     virtual void read( hydrointerfaces::LaserScanner2d::Data &data );
00031 
00032 private:
00033 
00034     LaserScanner2d::Config config_;
00035     hydroutil::Context context_;
00036 };
00037 
00038 // Used for dynamically loading driver
00039 class Factory : public hydrointerfaces::LaserScanner2dFactory
00040 {
00041 public:
00042     hydrointerfaces::LaserScanner2d *createDriver( 
00043                 const hydrointerfaces::LaserScanner2d::Config &config,
00044                 const hydroutil::Context &context ) const
00045     {
00046         return new Driver( config, context );
00047     }
00048 };
00049 
00050 } // namespace
00051 
00052 // Used for dynamically loading driver
00053 extern "C" {
00054     hydrointerfaces::LaserScanner2dFactory *createDriverFactory();
00055 }
00056 
00057 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5