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/hydrolaserscanner2dplayerclient/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_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     bool usePlayerTimestamp_;
00045 
00046     PlayerCc::PlayerClient *robot_;
00047     PlayerCc::LaserProxy *laser_;
00048 
00049     char *host_;
00050     int   port_;
00051     int   device_;
00052     std::string playerDriver_;
00053 
00054     hydroutil::Context context_;
00055 };
00056 
00057 // Used for dynamically loading driver
00058 class Factory : public hydrointerfaces::LaserScanner2dFactory
00059 {
00060 public:
00061     hydrointerfaces::LaserScanner2d*
00062     createDriver( const hydrointerfaces::LaserScanner2d::Config &config,
00063                                    const hydroutil::Context &context ) const
00064     {
00065         return new Driver( config, context );
00066     }
00067 };
00068 
00069 } // namespace
00070 
00071 // Used for dynamically loading driver
00072 extern "C" {
00073     hydrointerfaces::LaserScanner2dFactory *createLaserScanner2dDriverFactory();
00074 }
00075 
00076 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5