Changeset 13191 for trunk/FACT++
- Timestamp:
- 03/23/12 10:22:17 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/magicweather.cc
r12965 r13191 45 45 class ConnectionWeather : public Connection 46 46 { 47 int fState; 47 int fState; 48 uint16_t fInterval; 48 49 49 50 bool fIsVerbose; … … 209 210 PostRequest(); 210 211 211 fKeepAlive.expires_from_now(boost::posix_time::seconds( 55));212 fKeepAlive.expires_from_now(boost::posix_time::seconds(fInterval)); 212 213 fKeepAlive.async_wait(boost::bind(&ConnectionWeather::HandleRequest, 213 214 this, dummy::error)); … … 268 269 { 269 270 fIsVerbose = b; 271 } 272 273 void SetInterval(uint16_t i) 274 { 275 fInterval = i; 270 276 } 271 277 … … 457 463 458 464 fWeather.SetVerbose(!conf.Get<bool>("quiet")); 465 fWeather.SetInterval(conf.Get<uint16_t>("interval")); 459 466 460 467 return -1; … … 480 487 ("addr,a", var<string>("www.magic.iac.es:80"), "Network address of Cosy") 481 488 ("quiet,q", po_bool(true), "Disable printing contents of all received messages (except dynamic data) in clear text.") 489 ("interval,i", var<uint16_t>(25), "Interval between two server requests in seconds") 482 490 ; 483 491
Note:
See TracChangeset
for help on using the changeset viewer.