IBR-DTNSuite
0.12
|
#include <DTNTPWorker.h>
Public Types | |
enum | MSG_TYPE { TIMESYNC_REQUEST = 1, TIMESYNC_RESPONSE = 2 } |
Public Member Functions | |
TimeSyncMessage () | |
~TimeSyncMessage () | |
Public Attributes | |
MSG_TYPE | type |
timeval | origin_timestamp |
double | origin_rating |
timeval | peer_timestamp |
double | peer_rating |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const DTNTPWorker::TimeSyncMessage &obj) |
std::istream & | operator>> (std::istream &stream, DTNTPWorker::TimeSyncMessage &obj) |
TimeSyncMessage This class represent a sync message which is used to exchange data about the current clock state. During a short request-response contact the offset between two clock can be determined.
Definition at line 75 of file DTNTPWorker.h.
Enumerator | |
---|---|
TIMESYNC_REQUEST | |
TIMESYNC_RESPONSE |
Definition at line 78 of file DTNTPWorker.h.
dtn::daemon::DTNTPWorker::TimeSyncMessage::TimeSyncMessage | ( | ) |
Definition at line 121 of file DTNTPWorker.cpp.
References dtn::utils::Clock::gettimeofday(), origin_timestamp, and peer_timestamp.
dtn::daemon::DTNTPWorker::TimeSyncMessage::~TimeSyncMessage | ( | ) |
Definition at line 130 of file DTNTPWorker.cpp.
|
friend |
Definition at line 134 of file DTNTPWorker.cpp.
|
friend |
Definition at line 155 of file DTNTPWorker.cpp.
double dtn::daemon::DTNTPWorker::TimeSyncMessage::origin_rating |
Definition at line 90 of file DTNTPWorker.h.
Referenced by dtn::daemon::operator<<(), and dtn::daemon::operator>>().
timeval dtn::daemon::DTNTPWorker::TimeSyncMessage::origin_timestamp |
Definition at line 89 of file DTNTPWorker.h.
Referenced by dtn::daemon::operator<<(), dtn::daemon::operator>>(), and TimeSyncMessage().
double dtn::daemon::DTNTPWorker::TimeSyncMessage::peer_rating |
Definition at line 93 of file DTNTPWorker.h.
Referenced by dtn::daemon::operator<<(), and dtn::daemon::operator>>().
timeval dtn::daemon::DTNTPWorker::TimeSyncMessage::peer_timestamp |
Definition at line 92 of file DTNTPWorker.h.
Referenced by dtn::daemon::operator<<(), dtn::daemon::operator>>(), and TimeSyncMessage().
MSG_TYPE dtn::daemon::DTNTPWorker::TimeSyncMessage::type |
Definition at line 87 of file DTNTPWorker.h.
Referenced by dtn::daemon::operator<<(), and dtn::daemon::operator>>().