|
IBR-DTNSuite 0.6
|
#include <Clock.h>
Public Member Functions | |
| Clock () | |
| virtual | ~Clock () |
Static Public Member Functions | |
| static size_t | getTime () |
| static bool | isExpired (const dtn::data::Bundle &b) |
| static bool | isExpired (size_t timestamp, size_t lifetime=0) __attribute__((deprecated)) |
| static size_t | getExpireTime (const dtn::data::Bundle &b) |
| static size_t | getExpireTime (size_t timestamp, size_t lifetime) __attribute__((deprecated)) |
| static size_t | getExpireTime (size_t lifetime) |
Static Public Attributes | |
| static int | timezone = 0 |
| static u_int32_t | TIMEVAL_CONVERSION = 946684800 |
| static float | quality = 0 |
| static bool | badclock = false |
| size_t dtn::utils::Clock::getExpireTime | ( | const dtn::data::Bundle & | b | ) | [static] |
Definition at line 33 of file Clock.cpp.
References dtn::data::PrimaryBlock::_lifetime, dtn::data::PrimaryBlock::_timestamp, badclock, dtn::data::Bundle::getBlock(), dtn::data::AgeBlock::getSeconds(), and getTime().
Referenced by dtn::utils::Utils::encapsule(), dtn::data::MetaBundle::MetaBundle(), and dtn::routing::NeighborDatabase::NeighborEntry::update().

| size_t dtn::utils::Clock::getExpireTime | ( | size_t | timestamp, |
| size_t | lifetime | ||
| ) | [static] |
| size_t dtn::utils::Clock::getExpireTime | ( | size_t | lifetime | ) | [static] |
| size_t dtn::utils::Clock::getTime | ( | ) | [static] |
Definition at line 100 of file Clock.cpp.
References TIMEVAL_CONVERSION, and timezone.
Referenced by getExpireTime(), dtn::data::PrimaryBlock::relabel(), dtn::routing::NeighborDatabase::NeighborEntry::reset(), dtn::data::DTNTime::set(), and dtn::core::WallClock::timeout().
| bool dtn::utils::Clock::isExpired | ( | size_t | timestamp, |
| size_t | lifetime = 0 |
||
| ) | [static] |
| bool dtn::utils::Clock::isExpired | ( | const dtn::data::Bundle & | b | ) | [static] |
Definition at line 70 of file Clock.cpp.
References dtn::data::PrimaryBlock::_lifetime, dtn::data::PrimaryBlock::_timestamp, dtn::data::Bundle::getBlock(), and dtn::data::AgeBlock::getSeconds().
Referenced by dtn::core::BundleCore::validate().

bool dtn::utils::Clock::badclock = false [static] |
If set to true, all time based functions assume a bad clock and try to use other mechanisms to detect expiration.
Definition at line 65 of file Clock.h.
Referenced by getExpireTime(), dtn::daemon::Configuration::params(), and dtn::data::PrimaryBlock::relabel().
float dtn::utils::Clock::quality = 0 [static] |
Defines an estimation about the precision of the local time. If the clock is definitely wrong the value is zero and one when we have a perfect time sync. Everything between one and zero gives an abstract knowledge about the quality of time.
Definition at line 59 of file Clock.h.
Referenced by dtn::data::BundleList::expire().
u_int32_t dtn::utils::Clock::TIMEVAL_CONVERSION = 946684800 [static] |
int dtn::utils::Clock::timezone = 0 [static] |
Definition at line 50 of file Clock.h.
Referenced by getTime(), and setGlobalVars().