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

 

         

laserscanner2dplayerclient/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_PLAYERCLIENT_H
00012 #define HYDRO_LASERSCANNER2D_PLAYERCLIENT_H
00013 
00014 #include <hydrointerfaces/laserscanner2d.h>
00015 
00016 // Player proxies
00017 namespace PlayerCc
00018 {
00019 class PlayerClient;
00020 class LaserProxy;
00021 }
00022 
00023 namespace laserscanner2dplayerclient {
00024 
00025 /*
00026     @brief Interface to PlayerLaser laser.  Uses Player.
00027 
00028     @author Alex Brooks
00029  */
00030 class Driver : public hydrointerfaces::LaserScanner2d
00031 {
00032 public:
00033 
00034     Driver( const Config &cfg, const hydroutil::Context& context );
00035     virtual ~Driver();
00036 
00037     virtual void read( hydrointerfaces::LaserScanner2d::Data &data );
00038 
00039 private:
00040 
00041     void init();
00042 
00043     Config config_;
00044 
00045     PlayerCc::PlayerClient *robot_;
00046     PlayerCc::LaserProxy *laser_;
00047 
00048     char *host_;
00049     int   port_;
00050     int   device_;
00051     std::string playerDriver_;
00052 
00053     hydroutil::Context context_;
00054 };
00055 
00056 // Used for dynamically loading driver
00057 class Factory : public hydrointerfaces::LaserScanner2dFactory
00058 {
00059 public:
00060     hydrointerfaces::LaserScanner2d*
00061     createDriver( const hydrointerfaces::LaserScanner2d::Config &config,
00062                                    const hydroutil::Context &context ) const
00063     {
00064         return new Driver( config, context );
00065     }
00066 };
00067 
00068 } // namespace
00069 
00070 // Used for dynamically loading driver
00071 extern "C" {
00072     hydrointerfaces::LaserScanner2dFactory *createDriverFactory();
00073 }
00074 
00075 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5