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
|
logreaders.h00001 #ifndef ORCALOGFACTORY_LOGREADERS_H 00002 #define ORCALOGFACTORY_LOGREADERS_H 00003 00004 #include <orcalog/logreader.h> 00005 #include <orca/camera.h> 00006 #include <orca/drivebicycle.h> 00007 #include <orca/laserscanner2d.h> 00008 #include <orca/localise2d.h> 00009 #include <orca/localise3d.h> 00010 #include <orca/power.h> 00011 #include <orca/odometry2d.h> 00012 #include <orca/odometry3d.h> 00013 #include <orca/wifi.h> 00014 #include <orca/pathfollower2d.h> 00015 #include <orca/gps.h> 00016 00017 #include "camerareader.h" 00018 00019 namespace orcalogfactory { 00020 00021 // 00022 // A collection of classes capable of reading sub-logfiles for specific 00023 // interface types. 00024 // 00025 00026 class CameraLogReader : public orcalog::LogReader 00027 { 00028 public: 00029 CameraLogReader( const orcalog::LogReaderInfo &logReaderInfo ); 00030 void read( orca::ImageDataPtr &obj ); 00031 void read( orca::CameraDescriptionPtr &obj ); 00032 void read() { orca::ImageDataPtr obj=new orca::ImageData; read(obj); } 00033 void openLogFile(); 00034 private: 00035 // alen - member class for camera log readingso we can handle jpegs 00036 CameraReader cameraReader; 00037 00038 }; 00039 00041 00042 class DriveBicycleLogReader : public orcalog::LogReader 00043 { 00044 public: 00045 DriveBicycleLogReader( const orcalog::LogReaderInfo &logReaderInfo ); 00046 void read( orca::DriveBicycleData &obj ); 00047 void read( orca::VehicleDescription &obj ); 00048 void read() { orca::DriveBicycleData obj; read(obj); } 00049 }; 00050 00052 00053 class GpsLogReader : public orcalog::LogReader 00054 { 00055 public: 00056 GpsLogReader( const orcalog::LogReaderInfo &logReaderInfo ); 00057 void read( orca::GpsData &obj ); 00058 void read( orca::GpsDescription &obj ); 00059 void read() { orca::GpsData obj; read(obj); } 00060 }; 00061 00063 00064 class LaserScanner2dLogReader : public orcalog::LogReader 00065 { 00066 public: 00067 LaserScanner2dLogReader( const orcalog::LogReaderInfo &logReaderInfo ); 00068 void read( orca::LaserScanner2dDataPtr &obj ); 00069 void read( orca::RangeScanner2dDescription &obj ); 00070 void read() { orca::LaserScanner2dDataPtr obj=new orca::LaserScanner2dData; read(obj); } 00071 }; 00072 00074 00075 class RangeScanner2dLogReader : public orcalog::LogReader 00076 { 00077 public: 00078 RangeScanner2dLogReader( const orcalog::LogReaderInfo &logReaderInfo ); 00079 void read( orca::RangeScanner2dDataPtr &obj ); 00080 void read( orca::RangeScanner2dDescription &obj ); 00081 void read() { orca::RangeScanner2dDataPtr obj=new orca::RangeScanner2dData; read(obj); } 00082 }; 00083 00085 00086 class Localise2dLogReader : public orcalog::LogReader 00087 { 00088 public: 00089 Localise2dLogReader( const orcalog::LogReaderInfo &logReaderInfo ); 00090 void read( orca::Localise2dData &obj ); 00091 void read( orca::VehicleGeometryDescriptionPtr &obj ); 00092 void read() { orca::Localise2dData obj; read(obj); } 00093 }; 00094 00096 00097 class Localise3dLogReader : public orcalog::LogReader 00098 { 00099 public: 00100 Localise3dLogReader( const orcalog::LogReaderInfo &logReaderInfo ); 00101 void read( orca::Localise3dData &obj ); 00102 void read( orca::VehicleGeometryDescriptionPtr &obj ); 00103 void read() { orca::Localise3dData obj; read(obj); } 00104 }; 00105 00107 00108 class Odometry2dLogReader : public orcalog::LogReader 00109 { 00110 public: 00111 Odometry2dLogReader( const orcalog::LogReaderInfo &logReaderInfo ); 00112 void read( orca::Odometry2dData &obj ); 00113 void read( orca::VehicleDescription &obj ); 00114 void read() { orca::Odometry2dData obj; read(obj); } 00115 }; 00116 00118 00119 class Odometry3dLogReader : public orcalog::LogReader 00120 { 00121 public: 00122 Odometry3dLogReader( const orcalog::LogReaderInfo &logReaderInfo ); 00123 void read( orca::Odometry3dData &obj ); 00124 void read( orca::VehicleDescription &obj ); 00125 void read() { orca::Odometry3dData obj; read(obj); } 00126 }; 00127 00129 00130 class PowerLogReader : public orcalog::LogReader 00131 { 00132 public: 00133 PowerLogReader( const orcalog::LogReaderInfo &logReaderInfo ); 00134 void read( orca::PowerData &obj ); 00135 void read() { orca::PowerData obj; read(obj); } 00136 void initialised() { orcalog::LogReader::zeroLogIndex(); } 00137 }; 00138 00140 00141 class WifiLogReader : public orcalog::LogReader 00142 { 00143 public: 00144 WifiLogReader( const orcalog::LogReaderInfo &logReaderInfo ); 00145 void read( orca::WifiData &obj ); 00146 void read() { orca::WifiData obj; read(obj); } 00147 void initialised() { orcalog::LogReader::zeroLogIndex(); } 00148 }; 00149 00151 00152 class PathFollower2dLogReader : public orcalog::LogReader 00153 { 00154 public: 00155 PathFollower2dLogReader( const orcalog::LogReaderInfo &logReaderInfo ); 00156 void read( orca::PathFollower2dData &obj ); 00157 void read() { orca::PathFollower2dData obj; read(obj); } 00158 void initialised() { orcalog::LogReader::zeroLogIndex(); } 00159 }; 00160 00161 } 00162 00163 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)