Changeset 181 in pacpusframework
- Timestamp:
- Oct 21, 2013, 1:30:41 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/ProducerConsumerExample/CMakeLists.txt
r163 r181 43 43 ConsumerExample.h 44 44 ${PROJECT_NAME}.xml 45 ${EXPORT_HDR} 45 46 ) 46 47 set(PROJECT_SRCS … … 66 67 # ======================================== 67 68 qt_wrap_cpp( 68 69 "${FILES_TO_MOC}"69 PROJECT_MOC_SRCS 70 ${FILES_TO_MOC} 70 71 ) 71 72 72 73 qt_wrap_ui( 73 74 PROJECT_UI_SRCS 74 "${UI_FILES}"75 ${UI_FILES} 75 76 ) 76 77 -
trunk/include/Pacpus/DbitePlayer/DbtPlyFileManager.h
r89 r181 31 31 32 32 #include <QThread> 33 #include <string> 33 34 34 35 class QSemaphore; … … 82 83 public Q_SLOTS: 83 84 /// slot activated by the engine when it computes new DBT time 84 void 85 void playData(road_time_t tDbt,road_time_t tNow, bool reverse); 85 86 86 87 /// put the file descriptor to the beginning of the file … … 98 99 DbtPlyEngine * mEngine; 99 100 100 /// the absolute path of the DBT file 101 QString dbtProperty_; 102 /// @todo Documentation 103 QStringList mDbtFilenameList; 101 QStringList getDbiteFilenameList() const; 104 102 105 103 /// The directory where the DBT file is located 106 104 QString mDbtDataPath; 107 108 /// Display or not the graphical interface109 bool mShowGui;110 105 111 106 /// @todo Documentation … … 141 136 142 137 private: 143 // reading backward? 138 /// dbt property value 139 std::string dbtProperty_; 140 /// @todo Documentation 141 QStringList mDbtFilenameList; 142 143 /// reading backward? 144 144 bool reverse_; 145 145 -
trunk/include/Pacpus/PacpusTools
-
Property svn:global-ignores
set to
PacpusToolsConfig.h
-
Property svn:global-ignores
set to
-
trunk/include/Pacpus/kernel
-
Property svn:global-ignores
set to
PacpusLibConfig.h
-
Property svn:global-ignores
set to
-
trunk/include/Pacpus/kernel/ComponentBase.h
r177 r181 192 192 std::string mName; 193 193 std::string mTypeName; 194 bool mHasGui; 195 bool mVerbose; 196 int mVerbosityLevel; 194 195 /// Whether to display or not the graphical interface (GUI) 196 bool hasGui() const; 197 bool isOutputVerbose() const; 198 int getVerbosityLevel() const; 197 199 198 200 private: … … 208 210 209 211 private: 212 bool mHasGui; 213 bool mVerbose; 214 int mVerbosityLevel; 215 210 216 boost::program_options::options_description mOptionsDescription; 211 217 -
trunk/include/Pacpus/kernel/pacpus.h
r89 r181 58 58 #endif 59 59 60 struct donnees_gps 61 { 62 long ind_qualite; 63 double x, y; 64 double lon, lat; 65 float a, b, phi, sigma_lat, sigma_lon; 66 road_time_t time; 67 double alt_msl, d_geoidal; 68 }; 69 70 struct donnees_abs_zy 71 { 72 float dArD, dArG; 73 float speed; 74 road_time_t time; 75 }; 76 77 struct donnees_gyro 78 { 79 // les mesures sont prises par rapport au point C 80 // position de la centrale inertielle 81 // vitesse de lacet (rad.s-1) dans le repère de la masse suspendue 82 float psi_s; 83 road_time_t time; 84 }; 85 86 /// Definition of the structure which will be sent for each positioning 87 /// requests -> MapMatching.cpp 88 struct s_MatchedPosition 89 { 90 int state; /* Etat du serveur de position absolue hybridée*/ 91 double x_match; /* Position Matchée */ 92 double y_match; /* en x et y */ 93 double x; /* Position du véhicule */ 94 double y; /* en x et y */ 95 double theta; /* cap (par rapport à l'est) dans le système de la carte */ 96 double v; /* vitesse horizontale par rapport à la terre */ 97 unsigned long ID; /* ID de la route à laquelle appartient la position matchée */ 98 road_time_t time; 99 int way; /* Sens de la route parcourue 1=W2E, 2=E2W*/ 100 double dist; /* abscisse curviligne par rapport au début de la route */ 101 double pxx, pyy, pxy; /* covariance de l'erreur en position absolue*/ 102 double ptheta; /*covariance de l'erreur en cap*/ 103 double error; 104 donnees_gyro gyro; 105 donnees_abs_zy odo; 106 }; 107 60 108 #endif // DEF_PACPUS_H -
trunk/src/DBITEPlayerLib/DbtPlyEngine.cpp
r179 r181 27 27 static const SpeedType kMinSpeed = 1.0 / 32; 28 28 static const SpeedType kMaxSpeed = 32; 29 30 static const PlayMode kDefaultPlayMode = PlayModeLastData; 29 31 30 32 //////////////////////////////////////////////////////////////////////////////// … … 49 51 addParameters() 50 52 ("datadir", po::value<string>(&mDataDir)->required(), "set root data directory") 51 ("replay_mode", po::value< int>(&reinterpret_cast<int&>(replayMode_))->default_value(PlayModeLastData), "set data replay mode")53 ("replay_mode", po::value<unsigned>(&reinterpret_cast<unsigned&>(replayMode_))->default_value(kDefaultPlayMode), "set data replay mode") 52 54 ("log-config-file", po::value<string>(&mLoggerConfigFile), "set logger configuration file path") 53 55 ; -
trunk/src/DBITEPlayerLib/DbtPlyFileManager.cpp
r176 r181 21 21 DECLARE_STATIC_LOGGER("pacpus.core.DbtPlyFileManager"); 22 22 23 const char * kPropertyVerbose = "verbose";24 const int kPropertyVerboseDefaultValue = 1;25 26 const char * kPropertyDbiteFileName = "dbt";27 28 23 // It is the maximum time elapsed between the computation of the tDbt and the data replay in microseconds 29 24 static const int kMaxPendingTimeFromEngineMicrosecs = 10000; 25 26 static const char kFilenameSeparator = '|'; 30 27 31 28 //////////////////////////////////////////////////////////////////////////////// … … 40 37 tMin_ = numeric_limits<road_time_t>::max(); 41 38 tMax_ = numeric_limits<road_time_t>::min(); 39 40 namespace po = boost::program_options; 41 addParameters() 42 ("dbt", po::value<std::string>(&dbtProperty_)->required(), "set path to input DbiteFile(s) (*.dbt), separate files by '|'") 43 ; 44 } 45 46 QStringList DbtPlyFileManager::getDbiteFilenameList() const 47 { 48 return mDbtFilenameList; 42 49 } 43 50 … … 82 89 this, SLOT (beginfile())); 83 90 84 85 91 // get the properties in the XML node 86 /////////////////////////////////////////87 {88 QString verbose = config.getProperty(kPropertyVerbose);89 if (verbose.isNull()) {90 LOG_INFO("property " << kPropertyVerbose << " not set."91 << " Set to default = " << kPropertyVerboseDefaultValue92 );93 // default value94 mVerbose = kPropertyVerboseDefaultValue;95 } else {96 verbose = verbose.toLower();97 LOG_DEBUG("property " << kPropertyVerbose << "=\""98 << verbose.toStdString() << "\"");99 mVerbose = verbose.toInt();100 LOG_DEBUG("property interpreted as " << kPropertyVerbose << "=\""101 << mVerbose << "\"");102 }103 }104 105 /////////////////////////////////////////106 dbtProperty_ = config.getProperty(kPropertyDbiteFileName);107 mShowGui = config.getProperty("ui").toInt();108 92 mDbtDataPath = mEngine->getDataDir(); 109 110 mDbtFilenameList = dbtProperty_.split("|"); 93 mDbtFilenameList = QString(dbtProperty_.c_str()).split(kFilenameSeparator); 111 94 112 95 for (int i = 0; i < mDbtFilenameList.size(); ++i) { … … 159 142 /// Starts activity of the file manager 160 143 void DbtPlyFileManager::startActivity() 161 { 144 { 162 145 // graphical user interface 163 if ( mShowGui) {146 if (hasGui()) { 164 147 displayUI(); 165 148 } -
trunk/src/PacpusLib/ComponentBase.cpp
r180 r181 13 13 #include <string> 14 14 #include <vector> 15 16 const bool kPropertyVerboseDefaultValue = false; 15 17 16 18 namespace po = boost::program_options; … … 178 180 LOG_WARN("Component " << getName() << " does not containt output " << outputName); 179 181 return NULL; 182 } 183 184 bool ComponentBase::hasGui() const 185 { 186 return mHasGui; 187 } 188 189 bool ComponentBase::isOutputVerbose() const 190 { 191 return mVerbose || (getVerbosityLevel() > 0); 192 } 193 194 int ComponentBase::getVerbosityLevel() const 195 { 196 return mVerbosityLevel; 180 197 } 181 198
Note:
See TracChangeset
for help on using the changeset viewer.