orca-robotics INTRODUCTION Overview Download and Install Documentation REPOSITORY Interfaces Drivers Libraries Utilities Software Map DEVELOPER Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
laserscanner2dsickgbx/driver.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2008 Alex Brooks 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_SICK_GBX_H 00012 #define HYDRO_LASERSCANNER2D_SICK_GBX_H 00013 00014 #include <hydrointerfaces/laserscanner2d.h> 00015 #include <gbxsickacfr/driver.h> 00016 #include <memory> 00017 00018 namespace laserscanner2dsickgbx { 00019 00020 // 00021 // @author Alex Brooks 00022 // 00023 class Driver : public hydrointerfaces::LaserScanner2d 00024 { 00025 00026 public: 00027 00028 Driver( const Config &config, const hydroutil::Context &context ); 00029 00030 void read( hydrointerfaces::LaserScanner2d::Data &data ); 00031 00032 private: 00033 00034 std::auto_ptr<gbxsickacfr::Driver> device_; 00035 00036 Config config_; 00037 hydroutil::Context context_; 00038 }; 00039 00040 // Used for dynamically loading driver 00041 class Factory : public hydrointerfaces::LaserScanner2dFactory 00042 { 00043 public: 00044 hydrointerfaces::LaserScanner2d* 00045 createDriver( const hydrointerfaces::LaserScanner2d::Config &config, 00046 const hydroutil::Context &context ) const 00047 { 00048 return new Driver( config, context ); 00049 } 00050 }; 00051 00052 } // namespace 00053 00054 // Used for dynamically loading driver 00055 extern "C" { 00056 hydrointerfaces::LaserScanner2dFactory *createDriverFactory(); 00057 } 00058 00059 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)