IBR-DTNSuite  0.10
dtn::daemon::DTNTPWorker::TimeSyncMessage Class Reference

#include <DTNTPWorker.h>

Collaboration diagram for dtn::daemon::DTNTPWorker::TimeSyncMessage:
Collaboration graph

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)
 

Detailed Description

Determine the current local clock rating

Returns
The rating as double value. 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 80 of file DTNTPWorker.h.

Member Enumeration Documentation

Enumerator
TIMESYNC_REQUEST 
TIMESYNC_RESPONSE 

Definition at line 83 of file DTNTPWorker.h.

Constructor & Destructor Documentation

dtn::daemon::DTNTPWorker::TimeSyncMessage::TimeSyncMessage ( )

Definition at line 96 of file DTNTPWorker.cpp.

References dtn::utils::Clock::gettimeofday(), origin_timestamp, and peer_timestamp.

Here is the call graph for this function:

dtn::daemon::DTNTPWorker::TimeSyncMessage::~TimeSyncMessage ( )

Definition at line 105 of file DTNTPWorker.cpp.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
const DTNTPWorker::TimeSyncMessage obj 
)
friend

Definition at line 109 of file DTNTPWorker.cpp.

std::istream& operator>> ( std::istream &  stream,
DTNTPWorker::TimeSyncMessage obj 
)
friend

Definition at line 130 of file DTNTPWorker.cpp.

Member Data Documentation

double dtn::daemon::DTNTPWorker::TimeSyncMessage::origin_rating

Definition at line 95 of file DTNTPWorker.h.

Referenced by dtn::daemon::operator<<(), and dtn::daemon::operator>>().

timeval dtn::daemon::DTNTPWorker::TimeSyncMessage::origin_timestamp

Definition at line 94 of file DTNTPWorker.h.

Referenced by dtn::daemon::operator<<(), dtn::daemon::operator>>(), and TimeSyncMessage().

double dtn::daemon::DTNTPWorker::TimeSyncMessage::peer_rating

Definition at line 98 of file DTNTPWorker.h.

Referenced by dtn::daemon::operator<<(), and dtn::daemon::operator>>().

timeval dtn::daemon::DTNTPWorker::TimeSyncMessage::peer_timestamp

Definition at line 97 of file DTNTPWorker.h.

Referenced by dtn::daemon::operator<<(), dtn::daemon::operator>>(), and TimeSyncMessage().

MSG_TYPE dtn::daemon::DTNTPWorker::TimeSyncMessage::type

Definition at line 92 of file DTNTPWorker.h.

Referenced by dtn::daemon::operator<<(), and dtn::daemon::operator>>().


The documentation for this class was generated from the following files: