在NS-3中要实现移动路径追踪,首先应该想到MobilityModel移动模型,要实现追踪分析,就要用到trace sources.
The list of all trace sources:
http://www.nsnam.org/doxygen/group___trace_source_list.html
在trace sources中找到MobilityModel,看到下面有一个可以trace的属性:
CourseChange: The value of the position and/or velocity vector changed
表示可以分析移动后的速度、位置。
进入MobilityModel的TypeId ns3::MobilityModel::GetTypeId
http://www.nsnam.org/doxygen/classns3_1_1_mobility_model.html#a3d1346ba74cc805812fac131070ba439
可以看到: This object is accessible through the following paths with Config::Set and Config::Connect:
- /NodeList/[i]/$ns3::MobilityModel
- /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::HierarchicalMobilityModel/Child
- /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::HierarchicalMobilityModel/Parent
- /NodeList/[i]/DeviceList/[i]/$ns3::