Lines 815-822
AnimationInterface::WifiPhyTxBeginTrace (std::string context,
|
Link Here
|
---|
|
815 |
UpdatePosition (n); |
815 |
UpdatePosition (n); |
816 |
AnimPacketInfo pktInfo (ndev, Simulator::Now ()); |
816 |
AnimPacketInfo pktInfo (ndev, Simulator::Now ()); |
817 |
AddPendingPacket (AnimationInterface::WIFI, gAnimUid, pktInfo); |
817 |
AddPendingPacket (AnimationInterface::WIFI, gAnimUid, pktInfo); |
818 |
Ptr<WifiNetDevice> netDevice = DynamicCast<WifiNetDevice> (ndev); |
818 |
Mac48Address nodeAddr = Mac48Address::ConvertFrom(ndev->GetAddress ()); |
819 |
Mac48Address nodeAddr = netDevice->GetMac ()->GetAddress (); |
|
|
820 |
std::ostringstream oss; |
819 |
std::ostringstream oss; |
821 |
oss << nodeAddr; |
820 |
oss << nodeAddr; |
822 |
m_macToNodeIdMap[oss.str ()] = n->GetId (); |
821 |
m_macToNodeIdMap[oss.str ()] = n->GetId (); |
Lines 1472-1477
AnimationInterface::ConnectCallbacks ()
|
Link Here
|
---|
|
1472 |
MakeCallback (&AnimationInterface::WifiPhyTxDropTrace, this)); |
1471 |
MakeCallback (&AnimationInterface::WifiPhyTxDropTrace, this)); |
1473 |
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyRxDrop", |
1472 |
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyRxDrop", |
1474 |
MakeCallback (&AnimationInterface::WifiPhyRxDropTrace, this)); |
1473 |
MakeCallback (&AnimationInterface::WifiPhyRxDropTrace, this)); |
|
|
1474 |
|
1475 |
// Wave Mac |
1476 |
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WaveNetDevice/MacEntities/*/MacTx", |
1477 |
MakeCallback (&AnimationInterface::WifiMacTxTrace, this)); |
1478 |
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WaveNetDevice/MacEntities/*/MacTxDrop", |
1479 |
MakeCallback (&AnimationInterface::WifiMacTxDropTrace, this)); |
1480 |
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WaveNetDevice/MacEntities/*/MacRx", |
1481 |
MakeCallback (&AnimationInterface::WifiMacRxTrace, this)); |
1482 |
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WaveNetDevice/MacEntities/*/MacRxDrop", |
1483 |
MakeCallback (&AnimationInterface::WifiMacRxDropTrace, this)); |
1484 |
|
1485 |
// Wave Phy |
1486 |
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WaveNetDevice/PhyEntities/*/PhyTxBegin", |
1487 |
MakeCallback (&AnimationInterface::WifiPhyTxBeginTrace, this)); |
1488 |
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WaveNetDevice/PhyEntities/*/PhyTxDrop", |
1489 |
MakeCallback (&AnimationInterface::WifiPhyTxDropTrace, this)); |
1490 |
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WaveNetDevice/PhyEntities/*/PhyRxBegin", |
1491 |
MakeCallback (&AnimationInterface::WifiPhyRxBeginTrace, this)); |
1492 |
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WaveNetDevice/PhyEntities/*/PhyRxDrop", |
1493 |
MakeCallback (&AnimationInterface::WifiPhyRxDropTrace, this)); |
1475 |
} |
1494 |
} |
1476 |
|
1495 |
|
1477 |
Vector |
1496 |
Vector |