1 #include "Receiver.hpp"
\r
2 #include "PingPongTask.hpp"
\r
4 #include <HostNotFoundException.hpp>
\r
9 MSG_IMPLEMENT_DYNAMIC(Receiver, Process);
\r
11 const double commSizeLat = 1;
\r
12 const double commSizeBw = 100000000;
\r
14 int Receiver::main(int argc, char** argv)
\r
17 double communicationTime=0;
\r
18 double time = getClock();
\r
21 info("Try to get a task");
\r
23 PingPongTask* task = reinterpret_cast<PingPongTask*>(Task::get(0));
\r
25 double timeGot = getClock();
\r
26 double timeSent = task->getTime();
\r
30 info(TEXT_("Got at time ") + TEXT_(timeGot));
\r
31 info(TEXT_("Was sent at time ") + TEXT_(timeSent));
\r
35 communicationTime = timeGot - time;
\r
37 info(TEXT_( "Communication time : ") + TEXT_(communicationTime));
\r
39 info(TEXT_(" --- BW ") + bw.append(commSizeBw/communicationTime,"%07lf") + TEXT_(" ----"));
\r