#include <HostNotFoundException.hpp>\r
#include <Msg.hpp>\r
\r
-#include <iostream>\r
-using namespace std;\r
+#include <Msg.hpp>\r
\r
MSG_IMPLEMENT_DYNAMIC(Receiver, Process);\r
\r
\r
int Receiver::main(int argc, char** argv)\r
{\r
- cout <<"[" << getName() << ":" << getHost().getName() << "] " << "Hello I'm " << getName() << " on " << getHost().getName() << "!" << endl;\r
+ info("Hello");\r
double communicationTime=0;\r
double time = getClock();\r
+ StringHelper bw;\r
\r
- cout <<"[" << getName() << ":" << getHost().getName() << "try to get a task" << endl;\r
+ info("Try to get a task");\r
\r
PingPongTask* task = reinterpret_cast<PingPongTask*>(Task::get(0));\r
\r
\r
delete task;\r
\r
- cout <<"[" << getName() << ":" << getHost().getName() << "] " << "Got at time " << timeGot << endl;\r
- cout <<"[" << getName() << ":" << getHost().getName() << "] " << "Was sent at time " << timeSent << endl;\r
+ info(TEXT_("Got at time ") + TEXT_(timeGot));\r
+ info(TEXT_("Was sent at time ") + TEXT_(timeSent));\r
\r
time = timeSent;\r
\r
communicationTime = timeGot - time;\r
\r
- cout <<"[" << getName() << ":" << getHost().getName() << "] " << "Communication time : " << communicationTime << endl;\r
+ info(TEXT_( "Communication time : ") + TEXT_(communicationTime));\r
\r
- cout <<"[" << getName() << ":" << getHost().getName() << "] " << " --- bw " << commSizeBw/communicationTime << " ----" << endl;\r
+ info(TEXT_(" --- BW ") + bw.append(commSizeBw/communicationTime,"%07lf") + TEXT_(" ----"));\r
\r
- cout <<"[" << getName() << ":" << getHost().getName() << "] " << "goodbye!" << endl;\r
+ info("Goodbye!");\r
\r
delete this;\r
\r