WiFi clear channel cmu experiment class. More...
Public Member Functions | |
| Experiment () | |
| Experiment (std::string name) | |
| Constructor. | |
| uint32_t | Run (const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy, const WifiMacHelper &wifiMac, const YansWifiChannelHelper &wifiChannel) |
| Run an experiment. | |
Private Member Functions | |
| void | GenerateTraffic (Ptr< Socket > socket, uint32_t pktSize, uint32_t pktCount, Time pktInterval) |
| Generate the traffic. | |
| Vector | GetPosition (Ptr< Node > node) |
| Get the position of a node. | |
| void | ReceivePacket (Ptr< Socket > socket) |
| Receive a packet. | |
| void | SetPosition (Ptr< Node > node, Vector position) |
| Set the position of a node. | |
| Ptr< Socket > | SetupPacketReceive (Ptr< Node > node) |
| Setup the receiving socket. | |
Private Attributes | |
| Gnuplot2dDataset | m_output |
| Output dataset. | |
| uint32_t | m_pktsTotal |
| Total number of received packets. | |
WiFi clear channel cmu experiment class.
It handles the creation and run of an experiment.
Definition at line 41 of file wifi-clear-channel-cmu.cc.
| anonymous_namespace{wifi-clear-channel-cmu.cc}::Experiment::Experiment | ( | ) |
Definition at line 100 of file wifi-clear-channel-cmu.cc.
| anonymous_namespace{wifi-clear-channel-cmu.cc}::Experiment::Experiment | ( | std::string | name | ) |
Constructor.
| name | The name of the experiment. |
Definition at line 104 of file wifi-clear-channel-cmu.cc.
References ns3::Gnuplot2dDataset::LINES, and m_output.
|
private |
Generate the traffic.
| socket | The sending socket. |
| pktSize | The packet size. |
| pktCount | The number of packets to send. |
| pktInterval | The time between packets. |
Definition at line 146 of file wifi-clear-channel-cmu.cc.
References ns3::Create(), GenerateTraffic(), and ns3::Simulator::Schedule().
Referenced by GenerateTraffic(), and Run().
|
private |
Get the position of a node.
| node | The node. |
Definition at line 118 of file wifi-clear-channel-cmu.cc.
|
private |
Receive a packet.
| socket | The receiving socket. |
Definition at line 125 of file wifi-clear-channel-cmu.cc.
References m_pktsTotal.
Referenced by SetupPacketReceive().
| uint32_t anonymous_namespace{wifi-clear-channel-cmu.cc}::Experiment::Run | ( | const WifiHelper & | wifi, |
| const YansWifiPhyHelper & | wifiPhy, | ||
| const WifiMacHelper & | wifiMac, | ||
| const YansWifiChannelHelper & | wifiChannel ) |
Run an experiment.
| wifi | //!< The WifiHelper class. |
| wifiPhy | //!< The YansWifiPhyHelper class. |
| wifiMac | //!< The WifiMacHelper class. |
| wifiChannel | //!< The YansWifiChannelHelper class. |
Definition at line 169 of file wifi-clear-channel-cmu.cc.
References ns3::NodeContainer::Create(), ns3::YansWifiChannelHelper::Create(), ns3::CreateObject(), ns3::Socket::CreateSocket(), ns3::Simulator::Destroy(), GenerateTraffic(), ns3::NodeContainer::Get(), ns3::TypeId::LookupByName(), m_pktsTotal, NS_LOG_INFO, packetSize, ns3::Simulator::Run(), ns3::Simulator::Schedule(), ns3::Seconds(), and SetupPacketReceive().
|
private |
Set the position of a node.
| node | The node. |
| position | The position of the node. |
Definition at line 111 of file wifi-clear-channel-cmu.cc.
|
private |
Setup the receiving socket.
| node | The receiving node. |
Definition at line 135 of file wifi-clear-channel-cmu.cc.
References ns3::Socket::CreateSocket(), ns3::Ipv4Address::GetAny(), ns3::TypeId::LookupByName(), ns3::MakeCallback(), ReceivePacket(), and sink.
Referenced by Run().
|
private |
Output dataset.
Definition at line 97 of file wifi-clear-channel-cmu.cc.
Referenced by Experiment().
|
private |
Total number of received packets.
Definition at line 96 of file wifi-clear-channel-cmu.cc.
Referenced by ReceivePacket(), and Run().