Changeset 181 in pacpusframework for trunk/src/DBITEPlayerLib
- Timestamp:
- Oct 21, 2013, 1:30:41 PM (11 years ago)
- Location:
- trunk/src/DBITEPlayerLib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note:
See TracChangeset
for help on using the changeset viewer.