IBR-DTNSuite
0.12
Main Page
Namespaces
Classes
Files
File List
File Members
IBR-DTNSuite
Namespaces
Classes
Files
File List
daemon
src
api
core
AbstractWorker.cpp
AbstractWorker.h
BundleCore.cpp
BundleCore.h
BundleEvent.cpp
BundleEvent.h
BundleExpiredEvent.cpp
BundleExpiredEvent.h
BundleGeneratedEvent.cpp
BundleGeneratedEvent.h
BundlePurgeEvent.cpp
BundlePurgeEvent.h
CustodyEvent.cpp
CustodyEvent.h
Event.cpp
Event.h
EventDebugger.cpp
EventDebugger.h
EventDispatcher.h
EventReceiver.cpp
EventReceiver.h
EventSwitch.cpp
EventSwitch.h
FragmentManager.cpp
FragmentManager.h
GlobalEvent.cpp
GlobalEvent.h
Node.cpp
Node.h
NodeEvent.cpp
NodeEvent.h
StatusReportGenerator.cpp
StatusReportGenerator.h
TimeAdjustmentEvent.cpp
TimeAdjustmentEvent.h
TimeEvent.cpp
TimeEvent.h
WallClock.cpp
WallClock.h
net
routing
security
storage
CapsuleWorker.cpp
CapsuleWorker.h
Component.cpp
Component.h
config.h
Configuration.cpp
Configuration.h
Debugger.cpp
Debugger.h
DevNull.cpp
DevNull.h
DTNTPWorker.cpp
DTNTPWorker.h
EchoWorker.cpp
EchoWorker.h
Main.cpp
NativeDaemon.cpp
NativeDaemon.h
NTService.cpp
ibrcommon
ibrdtn
tools
File Members
TimeAdjustmentEvent.cpp
Go to the documentation of this file.
1
/*
2
* TimeAdjustmentEvent.cpp
3
*
4
* Created on: 11.09.2012
5
* Author: morgenro
6
*/
7
8
#include "
core/TimeAdjustmentEvent.h
"
9
#include "
core/EventDispatcher.h
"
10
#include <
ibrdtn/utils/Clock.h
>
11
#include <sstream>
12
#include <sys/time.h>
13
14
namespace
dtn
15
{
16
namespace
core
17
{
18
TimeAdjustmentEvent::TimeAdjustmentEvent(
const
timeval &o,
const
double
&r)
19
: offset(o), rating(r)
20
{
21
}
22
23
TimeAdjustmentEvent::~TimeAdjustmentEvent
()
24
{
25
}
26
27
void
TimeAdjustmentEvent::raise
(
const
timeval &offset,
const
double
&rating)
28
{
29
dtn::core::EventDispatcher<TimeAdjustmentEvent>::queue
(
new
TimeAdjustmentEvent
(offset, rating) );
30
}
31
32
const
std::string
TimeAdjustmentEvent::getName
()
const
33
{
34
return
className
;
35
}
36
37
std::string
TimeAdjustmentEvent::getMessage
()
const
38
{
39
std::stringstream ss;
40
ss <<
"time adjusted by "
<<
dtn::utils::Clock::toDouble
(
offset
) <<
"s, based on clock with rating "
<<
rating
;
41
return
ss.str();
42
}
43
44
const
std::string
TimeAdjustmentEvent::className
=
"TimeAdjustmentEvent"
;
45
}
/* namespace core */
46
}
/* namespace dtn */
daemon
src
core
TimeAdjustmentEvent.cpp
Generated on Thu Mar 27 2014 09:26:20 for IBR-DTNSuite by
1.8.4