FACT++
1.0
Main Page
Related Pages
Namespaces
Classes
Files
Examples
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
}
ConnectionWeather::fInterval
uint16_t fInterval
Definition:
magicweather.cc:34
Time
Adds some functionality to boost::posix_time::ptime for our needs.
Definition:
Time.h:30
Time::IsValid
bool IsValid() const
Definition:
Time.h:90
ConnectionWeather::fLastReception
Time fLastReception
Definition:
magicweather.cc:49
ConnectionWeather::fLastReport
Time fLastReport
Definition:
magicweather.cc:48
Here is the call graph for this function:
ConnectionWeather
Generated on Sun Sep 18 2016 20:50:45 for FACT++ by
1.8.11