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 Project Download Mailing lists
|
hydrodrivers/hydrogpsgarmingbx/driver.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2009 Duncan Mercer, 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_GPS_GARMIN_GBX_H 00012 #define HYDRO_GPS_GARMIN_GBX_H 00013 00014 #include <hydrointerfaces/gps.h> 00015 #include <gbxgarminacfr/driver.h> 00016 #include <memory> 00017 00018 namespace gpsgarmingbx { 00019 00020 class Driver : public hydrointerfaces::Gps 00021 { 00022 00023 public: 00024 00025 Driver( const hydrointerfaces::Gps::Config &cfg, const hydroutil::Context &context ); 00026 00027 // Blocks till new data is available 00028 virtual void read( hydrointerfaces::Gps::Data &data ); 00029 00030 private: 00031 00032 std::auto_ptr<gbxgarminacfr::Driver> device_; 00033 00034 hydrointerfaces::Gps::Config config_; 00035 hydroutil::Context context_; 00036 }; 00037 00038 // Used for dynamically loading driver 00039 class Factory : public hydrointerfaces::GpsFactory 00040 { 00041 public: 00042 hydrointerfaces::Gps *createDriver( 00043 const hydrointerfaces::Gps::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::GpsFactory *createGpsDriverFactory(); 00055 } 00056 00057 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)