So basically, I used RandomwayPoint model in NS3 and I got the result of nodes like this:
/NodeList/5/$ns3::MobilityModel/CourseChange x = 10, y = 20
/NodeList/6/$ns3::MobilityModel/CourseChange x = 30, y = 40
/NodeList/7/$ns3::MobilityModel/CourseChange x = 50, y = 80
/NodeList/5/$ns3::MobilityModel/CourseChange x = 10, y = 20
/NodeList/6/$ns3::MobilityModel/CourseChange x = 30, y = 40
/NodeList/7/$ns3::MobilityModel/CourseChange x = 50, y = 80
/NodeList/5/$ns3::MobilityModel/CourseChange x = 10, y = 20
/NodeList/6/$ns3::MobilityModel/CourseChange x = 30, y = 40
/NodeList/7/$ns3::MobilityModel/CourseChange x = 50, y = 80
At time 2s client sent 1024 bytes to 10.1.2.4 port 9
At time 2.01596s server received 1024 bytes from 10.1.3.3 port 49153
At time 2.01596s server sent 1024 bytes to 10.1.3.3 port 49153
At time 2.02464s client received 1024 bytes from 10.1.2.4 port 9
......
But how to record the time of the each node's movement?
I think the most relevant code is about using Simulator:: Now().GetSeconds()
Here is the code I wrote:
std::ostringstream oss2(std::ostringstream::ate);
oss2.str("TimeStamp:");
oss2 << Simulator::Now().GetSeconds ();
std::cout << oss2.str() << "\t";
But I got the result equals to 0s. I felt confused about this, I would appreciate that if anyone can offer me a better solution and help me figure this out.
ManyThanks.