FACT++  1.0
int ConnectionWeather::GetState ( ) const
inline

Definition at line 367 of file tngweather.cc.

References Time::IsValid(), and kMaxAddr.

368  {
369  if (fLastReport.IsValid() && fLastReport+boost::posix_time::seconds(fInterval*2)>Time())
370  return 3; // receiving
371 
372  if (fLastReception.IsValid() && fLastReception+boost::posix_time::seconds(fInterval*2)>Time())
373  return 2; // connected
374 
375  return 1; // Disconnected
376  }
Adds some functionality to boost::posix_time::ptime for our needs.
Definition: Time.h:30
bool IsValid() const
Definition: Time.h:90

+ Here is the call graph for this function: