Created
April 1, 2019 03:04
-
-
Save ashiqopu/0346359297143866f1748322a9e6f125 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. | |
. | |
. | |
uint32_t MacTxDropCount, PhyTxDropCount, PhyRxDropCount; | |
void | |
MacTxDrop(Ptr<const Packet> p) | |
{ | |
NS_LOG_INFO("Packet Drop"); | |
MacTxDropCount++; | |
} | |
void | |
PhyTxDrop(Ptr<const Packet> p) | |
{ | |
NS_LOG_INFO("Packet Drop"); | |
PhyTxDropCount++; | |
} | |
void | |
PhyRxDrop(Ptr<const Packet> p) | |
{ | |
NS_LOG_INFO("Packet Drop"); | |
PhyRxDropCount++; | |
} | |
. | |
. | |
. | |
int main() | |
{ | |
. | |
. | |
. | |
Config::ConnectWithoutContext("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/MacTxDrop", MakeCallback(&MacTxDrop)); | |
Config::ConnectWithoutContext("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyRxDrop", MakeCallback(&PhyRxDrop)); | |
Config::ConnectWithoutContext("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyTxDrop", MakeCallback(&PhyTxDrop)); | |
. | |
. | |
. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment