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
|
logwriters.h00001 #ifndef ORCALOGFACTORY_LOGWRITERS_H 00002 #define ORCALOGFACTORY_LOGWRITERS_H 00003 00004 #include <orcalog/logwriter.h> 00005 #include <orca/cpu.h> 00006 #include <orca/drivebicycle.h> 00007 #include <orca/imu.h> 00008 #include <orca/laserscanner2d.h> 00009 #include <orca/localise2d.h> 00010 #include <orca/localise3d.h> 00011 #include <orca/odometry2d.h> 00012 #include <orca/odometry3d.h> 00013 #include <orca/polarfeature2d.h> 00014 #include <orca/power.h> 00015 #include <orca/wifi.h> 00016 #include <orca/gps.h> 00017 #include <orca/pathfollower2d.h> 00018 00019 #include <orca/camera.h> 00020 #include <orca/image.h> 00021 #include <orca/multicamera.h> 00022 #include "camerawriter.h" 00023 #include "multicamerawriter.h" 00024 00025 namespace orcalogfactory { 00026 00027 // 00028 // A collection of classes capable of writing sub-logfiles for specific 00029 // interface types. 00030 // 00031 00033 00034 class CpuLogWriter : public orcalog::LogWriter 00035 { 00036 public: 00037 void checkFormat( const std::string &format ); 00038 void write( const orca::CpuData &obj, const orca::Time &arrivalTime ); 00039 }; 00040 00042 00043 class DriveBicycleLogWriter : public orcalog::LogWriter 00044 { 00045 public: 00046 void checkFormat( const std::string &format ); 00047 void write( const orca::DriveBicycleData &obj, const orca::Time &arrivalTime ); 00048 void write( const orca::VehicleDescription &descr ); 00049 }; 00050 00052 00053 class ImuLogWriter : public orcalog::LogWriter 00054 { 00055 public: 00056 void checkFormat( const std::string &format ); 00057 void write( const orca::ImuData &obj, const orca::Time &arrivalTime ); 00058 }; 00059 00061 00062 class LaserScanner2dLogWriter : public orcalog::LogWriter 00063 { 00064 public: 00065 void checkFormat( const std::string &format ); 00066 void write( const orca::LaserScanner2dDataPtr &obj, const orca::Time &arrivalTime ); 00067 void write( const orca::RangeScanner2dDescription &descr ); 00068 }; 00069 00071 00072 class RangeScanner2dLogWriter : public orcalog::LogWriter 00073 { 00074 public: 00075 void checkFormat( const std::string &format ); 00076 void write( const orca::RangeScanner2dDataPtr &obj, const orca::Time &arrivalTime ); 00077 void write( const orca::RangeScanner2dDescription &descr ); 00078 }; 00079 00081 00082 class Localise2dLogWriter : public orcalog::LogWriter 00083 { 00084 public: 00085 void checkFormat( const std::string &format ); 00086 void write( const orca::Localise2dData &obj, const orca::Time &arrivalTime ); 00087 void write( const orca::VehicleGeometryDescriptionPtr &descr ); 00088 }; 00089 00091 00092 class Localise3dLogWriter : public orcalog::LogWriter 00093 { 00094 public: 00095 void checkFormat( const std::string &format ); 00096 void write( const orca::Localise3dData &obj, const orca::Time &arrivalTime ); 00097 void write( const orca::VehicleGeometryDescriptionPtr &descr ); 00098 }; 00099 00101 00102 class Odometry2dLogWriter : public orcalog::LogWriter 00103 { 00104 public: 00105 void checkFormat( const std::string &format ); 00106 void write( const orca::Odometry2dData &obj, const orca::Time &arrivalTime ); 00107 void write( const orca::VehicleDescription &descr ); 00108 }; 00109 00111 00112 class Odometry3dLogWriter : public orcalog::LogWriter 00113 { 00114 public: 00115 void checkFormat( const std::string &format ); 00116 void write( const orca::Odometry3dData &obj, const orca::Time &arrivalTime ); 00117 void write( const orca::VehicleDescription &descr ); 00118 }; 00119 00121 00122 class PolarFeature2dLogWriter : public orcalog::LogWriter 00123 { 00124 public: 00125 void checkFormat( const std::string &format ); 00126 void write( const orca::PolarFeature2dData &obj, const orca::Time &arrivalTime ); 00127 }; 00128 00130 00131 class PowerLogWriter : public orcalog::LogWriter 00132 { 00133 public: 00134 void checkFormat( const std::string &format ); 00135 void write( const orca::PowerData &obj, const orca::Time &arrivalTime ); 00136 }; 00137 00139 00140 class WifiLogWriter : public orcalog::LogWriter 00141 { 00142 public: 00143 void checkFormat( const std::string &format ); 00144 void write( const orca::WifiData &obj, const orca::Time &arrivalTime ); 00145 }; 00146 00148 00149 class GpsLogWriter : public orcalog::LogWriter 00150 { 00151 public: 00152 void checkFormat( const std::string &format ); 00153 void write( const orca::GpsData &obj, const orca::Time &arrivalTime ); 00154 void write( const orca::GpsDescription &descr ); 00155 }; 00156 00158 00159 class ImageLogWriter : public orcalog::LogWriter 00160 { 00161 public: 00162 void checkFormat( const std::string &format ); 00163 void write( const orca::ImageDataPtr &obj, const orca::Time &arrivalTime ); 00164 void write( const orca::ImageDescriptionPtr &descr ); 00165 }; 00166 00168 00169 class CameraLogWriter : public orcalog::LogWriter 00170 { 00171 public: 00172 void checkFormat( const std::string &format ); 00173 void write( const orca::ImageDataPtr &obj, const orca::Time &arrivalTime ); 00174 void write( const orca::CameraDescriptionPtr &descr ); 00175 void createLogFile( const std::string &filename, const std::string &format ); 00176 private: 00177 // alen - member class for camera logging so we can handle jpegs 00178 CameraWriter cameraWriter; 00179 00180 }; 00181 00183 00184 class MultiCameraLogWriter : public orcalog::LogWriter 00185 { 00186 public: 00187 void checkFormat( const std::string &format ); 00188 void write( const orca::MultiCameraDataPtr &obj, const orca::Time &arrivalTime ); 00189 void write( const orca::MultiCameraDescriptionPtr &descr ); 00190 void initMultiCameraWriter( const orca::MultiCameraDescriptionPtr &descr ); 00191 void createLogFile( const std::string &filename, const std::string &format ); 00192 private: 00193 // alen - member class for camera logging so we can handle jpegs 00194 MultiCameraWriter multiCameraWriter; 00195 00196 }; 00197 00199 00200 class PathFollower2dLogWriter : public orcalog::LogWriter 00201 { 00202 public: 00203 void checkFormat( const std::string &format ); 00204 void write( const orca::PathFollower2dData &obj, const orca::Time &arrivalTime ); 00205 }; 00206 00208 00209 } 00210 00211 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)