- Timestamp:
- 05/24/12 21:51:38 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/tngweather.cc
r13869 r13887 63 63 } 64 64 65 virtual void UpdateDust(const Time &, const float &) 66 { 67 } 68 65 69 string fRdfData; 66 uint32_t missing;70 float fDust; 67 71 68 72 protected: … … 136 140 PostClose(false); 137 141 142 if (fIsVerbose) 143 { 144 Out() << "------------------------------------------------------" << endl; 145 Out() << data << endl; 146 Out() << "------------------------------------------------------" << endl; 147 } 138 148 139 149 const Soprano::Parser* p = Soprano::PluginManager::instance()->discoverParserForSerialization( Soprano::SerializationRdfXml ); … … 197 207 throw runtime_error("time invalid"); 198 208 199 if (time!=fLastReport )209 if (time!=fLastReport && fIsVerbose) 200 210 { 201 211 Out() << endl; … … 220 230 UpdateWeather(time, w); 221 231 222 } 232 if (fDust==w.fDustTotal) 233 return; 234 235 UpdateDust(time, w.fDustTotal); 236 fDust = w.fDustTotal; 237 238 ostringstream out; 239 out << setprecision(3) << "Dust: " << fDust << "ug/m^3 [" << time << "]"; 240 Message(out); 241 } 242 223 243 catch (const exception &e) 224 244 { … … 311 331 public: 312 332 ConnectionWeather(ba::io_service& ioservice, MessageImp &imp) : Connection(ioservice, imp()), 313 fIsVerbose(true), fLastReport(Time::none), fLastReception(Time::none), fKeepAlive(ioservice) 333 fIsVerbose(true), fDust(-1), 334 fLastReport(Time::none), fLastReception(Time::none), 335 fKeepAlive(ioservice) 314 336 { 315 337 SetLogStream(&imp); … … 356 378 DimDescribedService fDimAtmosphere; 357 379 358 double dust;359 360 380 virtual void UpdateWeather(const Time &t, const DimWeather &data) 361 381 { 362 382 fDimWeather.setData(&data, sizeof(DimWeather)); 363 383 fDimWeather.Update(t); 364 365 if (dust==data.fDustTotal) 366 return;367 368 fDimAtmosphere.setData(&d ata.fDustTotal, sizeof(float));384 } 385 386 virtual void UpdateDust(const Time &t, const float &dust) 387 { 388 fDimAtmosphere.setData(&dust, sizeof(float)); 369 389 fDimAtmosphere.Update(t); 370 371 dust = data.fDustTotal;372 390 } 373 391 … … 389 407 "|Seeing[W/m^2]:Seeing"), 390 408 fDimAtmosphere("TNG_WEATHER/DUST", "F:1", 391 "|Dust[ug/m^3]:Dust (total)"), 392 dust(-1) 409 "|Dust[ug/m^3]:Dust (total)") 393 410 { 394 411 }
Note:
See TracChangeset
for help on using the changeset viewer.