22 #ifndef DTNTPWORKER_H_
23 #define DTNTPWORKER_H_
126 static double toDouble(
const timespec &val);
155 bool isExpired()
const;
158 struct timespec request_monotonic_time;
159 timeval request_timestamp;
165 static const unsigned int PROTO_VERSION;
166 static const std::string
TAG;
184 bool hasReference()
const;
200 void sync(
const TimeSyncMessage &msg,
const struct timeval &tv,
const struct timeval &local,
const struct timeval &remote);
205 static TimeSyncState _sync_state;
208 bool _announce_rating;
214 ibrcommon::Mutex _sync_lock;
217 ibrcommon::Mutex _peer_lock;
218 typedef std::map<EID, SyncPeer> peer_map;
void onUpdateBeacon(const ibrcommon::vinterface &iface, DiscoveryBeacon &announcement)
friend std::ostream & operator<<(std::ostream &stream, const DTNTPWorker::TimeSyncMessage &obj)
friend std::istream & operator>>(std::istream &stream, DTNTPWorker::TimeSyncMessage &obj)
static double toDouble(const timespec &val)
void callbackBundleReceived(const Bundle &b)
static const TimeSyncState & getState()
void raiseEvent(const dtn::core::TimeEvent &evt)
struct timespec last_sync_time