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/hydrolaserscanner2dhokuyoaist/driver.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2009 Michael Moser
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_HOKUYO_AIST_H
00012 #define HYDRO_LASERSCANNER2D_HOKUYO_AIST_H
00013 
00014 #include <hydrointerfaces/laserscanner2d.h>
00015 #include <memory>
00016 
00017 namespace hokuyo_aist {
00018     class HokuyoLaser;
00019 }
00020 
00021 namespace laserscanner2dhokuyoaist {
00022 
00023 class Driver : public hydrointerfaces::LaserScanner2d
00024 {
00025 
00026 public: 
00027 
00028     Driver( const Config & cfg, const hydroutil::Context & context );
00029     ~Driver();
00030 
00031     // Blocks till new data is available
00032     virtual void read( hydrointerfaces::LaserScanner2d::Data &data );
00033 
00034 private: 
00035     void init();
00036 
00037     std::auto_ptr<hokuyo_aist::HokuyoLaser> laser_;
00038 
00039     Config config_;
00040     hydroutil::Context context_;
00041 };
00042 
00043 // Used for dynamically loading driver
00044 class Factory : public hydrointerfaces::LaserScanner2dFactory
00045 {
00046 public:
00047     hydrointerfaces::LaserScanner2d*
00048     createDriver( const hydrointerfaces::LaserScanner2d::Config &config,
00049                   const hydroutil::Context &context ) const
00050     {
00051         return new Driver( config, context );
00052     }
00053 };
00054 
00055 } // namespace
00056 
00057 // Used for dynamically loading driver
00058 extern "C" {
00059     hydrointerfaces::LaserScanner2dFactory *createLaserScanner2dDriverFactory();
00060 }
00061 
00062 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5