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
|
hydrolibs/hydropublish/rangescanner2dpublisher.h00001 #ifndef HYDROPUBLISH_RANGESCANNER2DPUBLISHER_H 00002 #define HYDROPUBLISH_RANGESCANNER2DPUBLISHER_H 00003 00004 #include <boost/shared_ptr.hpp> 00005 #include <hydrotime/time.h> 00006 #include <hydroscanutil/scanutil.h> 00007 #include <hydronavutil/pose.h> 00008 00009 namespace hydropublish { 00010 00011 // 00012 // @brief Knows how to inform the world of RangeScanner2d information. 00013 // 00014 // @author Alex Brooks 00015 // 00016 class RangeScanner2dPublisher 00017 { 00018 public: 00019 virtual ~RangeScanner2dPublisher() {} 00020 00021 virtual void init()=0; 00022 virtual void localSetAndSend( const std::vector<float> &ranges, 00023 const hydrotime::Time &time = hydrotime::Time(0,0) )=0; 00024 00025 private: 00026 00027 }; 00028 typedef boost::shared_ptr<RangeScanner2dPublisher> RangeScanner2dPublisherPtr; 00029 00030 // 00031 // Does nothing 00032 // 00033 class DummyRangeScanner2dPublisher : public RangeScanner2dPublisher { 00034 public: 00035 void init() {} 00036 void localSetAndSend( const std::vector<float> &ranges, 00037 const hydrotime::Time &time = hydrotime::Time(0,0) ) {} 00038 }; 00039 00040 // 00041 // @brief Knows how to create RangeScanner2dPublisher's 00042 // 00043 // @author Alex Brooks 00044 // 00045 class RangeScanner2dPublisherFactory 00046 { 00047 public: 00048 virtual ~RangeScanner2dPublisherFactory() {} 00049 00050 virtual RangeScanner2dPublisherPtr createPublisher( const hydroscanutil::ScannerConfig &scannerConfig, 00051 const hydronavutil::Pose &scannerOffset, 00052 const std::string &name ) = 0; 00053 00054 private: 00055 }; 00056 typedef boost::shared_ptr<RangeScanner2dPublisherFactory> RangeScanner2dPublisherFactoryPtr; 00057 00058 // 00059 // Produces dummy publishers 00060 // 00061 class DummyRangeScanner2dPublisherFactory : public RangeScanner2dPublisherFactory { 00062 public: 00063 00064 RangeScanner2dPublisherPtr createPublisher( const hydroscanutil::ScannerConfig &scannerConfig, 00065 const hydronavutil::Pose &scannerOffset, 00066 const std::string &name ) 00067 { return RangeScanner2dPublisherPtr( new DummyRangeScanner2dPublisher ); } 00068 00069 }; 00070 00071 } 00072 00073 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)