Class to collect node statistics. More...
Collaboration diagram for NodeStatistics:Public Member Functions | |
| NodeStatistics (NetDeviceContainer aps, NetDeviceContainer stas) | |
| Constructor. | |
| NodeStatistics (NetDeviceContainer aps, NetDeviceContainer stas) | |
| Constructor. | |
| NodeStatistics (NetDeviceContainer aps, NetDeviceContainer stas) | |
| Constructor. | |
| void | AdvancePosition (Ptr< Node > node, int stepsSize, int stepsTime) |
| Move a node. | |
| void | AdvancePosition (Ptr< Node > node, int stepsSize, int stepsTime) |
| Advance node position. | |
| void | CheckStatistics (double time) |
| Collects the statistics at a given time. | |
| Gnuplot2dDataset | GetBusyDatafile () |
| Get the BUSY state output data. | |
| double | GetBusyTime () const |
| Get the Busy time. | |
| Gnuplot2dDataset | GetDatafile () |
| Get the Throughput output data. | |
| Gnuplot2dDataset | GetDatafile () |
| Get the Throughput output data. | |
| Gnuplot2dDataset | GetDatafile () |
| Gnuplot2dDataset | GetIdleDatafile () |
| Get the IDLE state output data. | |
| Vector | GetPosition (Ptr< Node > node) |
| Get the Position of a node. | |
| Vector | GetPosition (Ptr< Node > node) |
| Get node position. | |
| Gnuplot2dDataset | GetPowerDatafile () |
| Get the Power output data. | |
| Gnuplot2dDataset | GetPowerDatafile () |
| Get the Power output data. | |
| Gnuplot2dDataset | GetRxDatafile () |
| Get the RX state output data. | |
| Gnuplot2dDataset | GetTxDatafile () |
| Get the TX state output data. | |
| void | PhyCallback (std::string path, Ptr< const Packet > packet, double powerW) |
| Callback called by WifiNetDevice/Phy/PhyTxBegin. | |
| void | PhyCallback (std::string path, Ptr< const Packet > packet, double powerW) |
| Callback called by WifiNetDevice/Phy/PhyTxBegin. | |
| void | PowerCallback (std::string path, double oldPower, double newPower, Mac48Address dest) |
| Callback called by WifiNetDevice/RemoteStationManager/x/PowerChange. | |
| void | PowerCallback (std::string path, double oldPower, double newPower, Mac48Address dest) |
| Callback called by WifiNetDevice/RemoteStationManager/x/PowerChange. | |
| void | RateCallback (std::string path, DataRate oldRate, DataRate newRate, Mac48Address dest) |
| Callback called by WifiNetDevice/RemoteStationManager/x/RateChange. | |
| void | RateCallback (std::string path, DataRate oldRate, DataRate newRate, Mac48Address dest) |
| Callback called by WifiNetDevice/RemoteStationManager/x/RateChange. | |
| void | RxCallback (std::string path, Ptr< const Packet > packet, const Address &from) |
| Callback called by PacketSink/Rx. | |
| void | RxCallback (std::string path, Ptr< const Packet > packet, const Address &from) |
| Callback called by PacketSink/Rx. | |
| void | RxCallback (std::string path, Ptr< const Packet > packet, const Address &from) |
| RX callback. | |
| void | SetPosition (Ptr< Node > node, Vector position) |
| Set the Position of a node. | |
| void | SetPosition (Ptr< Node > node, Vector position) |
| Set node position. | |
| void | StateCallback (std::string path, Time init, Time duration, WifiPhyState state) |
| Callback called by YansWifiPhy/State/State. | |
Private Types | |
| typedef std::vector< std::pair< Time, DataRate > > | TxTime |
| Time, DataRate pair vector. | |
| typedef std::vector< std::pair< Time, DataRate > > | TxTime |
| Time, DataRate pair vector. | |
Private Member Functions | |
| Time | GetCalcTxTime (DataRate rate) |
| Get the time at which a given datarate has been recorded. | |
| Time | GetCalcTxTime (DataRate rate) |
| Get the time at which a given datarate has been recorded. | |
| void | SetupPhy (Ptr< WifiPhy > phy) |
| Setup the WifiPhy object. | |
| void | SetupPhy (Ptr< WifiPhy > phy) |
| Setup the WifiPhy object. | |
Private Attributes | |
| double | busyTime |
| BUSY time. | |
| double | idleTime |
| IDLE time. | |
| uint32_t | m_bytesTotal |
| Number of received bytes on a given state. | |
| std::map< Mac48Address, double > | m_currentPower |
| Current Tx power for each sender. | |
| std::map< Mac48Address, DataRate > | m_currentRate |
| Current Tx rate for each sender. | |
| Gnuplot2dDataset | m_output |
| Throughput output data. | |
| Gnuplot2dDataset | m_output_busy |
| BUSY output data. | |
| Gnuplot2dDataset | m_output_idle |
| IDLE output data. | |
| Gnuplot2dDataset | m_output_power |
| Power output data. | |
| Gnuplot2dDataset | m_output_rx |
| RX output data. | |
| Gnuplot2dDataset | m_output_tx |
| TX output data. | |
| TxTime | m_timeTable |
| Time, DataRate table. | |
| double | m_totalBusyTime |
| Total time in BUSY state. | |
| double | m_totalEnergy |
| Energy used on a given state. | |
| double | m_totalIdleTime |
| Total time in IDLE state. | |
| double | m_totalRxTime |
| Total time in RX state. | |
| double | m_totalTime |
| Time spent on a given state. | |
| double | m_totalTxTime |
| Total time in TX state. | |
| double | rxTime |
| RX time. | |
| double | txTime |
| TX time. | |
Class to collect node statistics.
Node statistics.
Definition at line 116 of file wifi-power-adaptation-distance.cc.
|
private |
Time, DataRate pair vector.
Definition at line 198 of file wifi-power-adaptation-distance.cc.
|
private |
Time, DataRate pair vector.
Definition at line 196 of file wifi-power-adaptation-interference.cc.
| NodeStatistics::NodeStatistics | ( | NetDeviceContainer | aps, |
| NetDeviceContainer | stas | ||
| ) |
Constructor.
| aps | Access points |
| stas | WiFi Stations. |
Definition at line 223 of file wifi-power-adaptation-distance.cc.
References ns3::NetDeviceContainer::Get(), ns3::NetDeviceContainer::GetN(), m_bytesTotal, m_currentPower, m_currentRate, m_output, m_output_power, m_totalEnergy, m_totalTime, ns3::GnuplotDataset::SetTitle(), and SetupPhy().
Here is the call graph for this function:| NodeStatistics::NodeStatistics | ( | NetDeviceContainer | aps, |
| NetDeviceContainer | stas | ||
| ) |
Constructor.
| aps | Access points |
| stas | WiFi Stations. |
| NodeStatistics::NodeStatistics | ( | NetDeviceContainer | aps, |
| NetDeviceContainer | stas | ||
| ) |
Constructor.
| aps | AP devices |
| stas | STA devices |
Move a node.
| node | The node. |
| stepsSize | The step size. |
| stepsTime | Time on each step. |
Definition at line 328 of file wifi-power-adaptation-distance.cc.
References ns3::Gnuplot2dDataset::Add(), AdvancePosition(), GetPosition(), m_bytesTotal, m_output, m_output_power, m_totalEnergy, m_totalTime, ns3::Simulator::Now(), NS_LOG_INFO, ns3::Simulator::Schedule(), ns3::Seconds(), and SetPosition().
Referenced by AdvancePosition().
Here is the call graph for this function:
Here is the caller graph for this function:Advance node position.
| node | the node |
| stepsSize | the size of a step |
| stepsTime | the time interval between steps |
| void NodeStatistics::CheckStatistics | ( | double | time | ) |
Collects the statistics at a given time.
| time | Time at which the statistics are collected. |
Definition at line 360 of file wifi-power-adaptation-interference.cc.
References ns3::Gnuplot2dDataset::Add(), busyTime, CheckStatistics(), idleTime, m_bytesTotal, m_output, m_output_busy, m_output_idle, m_output_power, m_output_rx, m_output_tx, m_totalEnergy, m_totalTime, ns3::Simulator::Now(), rxTime, ns3::Simulator::Schedule(), ns3::Seconds(), and txTime.
Referenced by CheckStatistics().
Here is the call graph for this function:
Here is the caller graph for this function:| Gnuplot2dDataset NodeStatistics::GetBusyDatafile | ( | ) |
Get the BUSY state output data.
Definition at line 401 of file wifi-power-adaptation-interference.cc.
References m_output_busy.
| double NodeStatistics::GetBusyTime | ( | ) | const |
Get the Busy time.
Definition at line 419 of file wifi-power-adaptation-interference.cc.
References m_totalBusyTime, and m_totalRxTime.
Get the time at which a given datarate has been recorded.
| rate | The datarate to search. |
Definition at line 264 of file wifi-power-adaptation-distance.cc.
References m_timeTable, NS_ASSERT, and ns3::Seconds().
Referenced by PhyCallback().
Here is the call graph for this function:
Here is the caller graph for this function:Get the time at which a given datarate has been recorded.
| rate | The datarate to search. |
| Gnuplot2dDataset NodeStatistics::GetDatafile | ( | ) |
Get the Throughput output data.
Definition at line 351 of file wifi-power-adaptation-distance.cc.
References m_output.
| Gnuplot2dDataset NodeStatistics::GetDatafile | ( | ) |
Get the Throughput output data.
| Gnuplot2dDataset NodeStatistics::GetDatafile | ( | ) |
| Gnuplot2dDataset NodeStatistics::GetIdleDatafile | ( | ) |
Get the IDLE state output data.
Definition at line 395 of file wifi-power-adaptation-interference.cc.
References m_output_idle.
Get the Position of a node.
| node | The node. |
Definition at line 321 of file wifi-power-adaptation-distance.cc.
Referenced by AdvancePosition().
Here is the caller graph for this function:Get node position.
| node | the node |
| Gnuplot2dDataset NodeStatistics::GetPowerDatafile | ( | ) |
Get the Power output data.
Definition at line 357 of file wifi-power-adaptation-distance.cc.
References m_output_power.
| Gnuplot2dDataset NodeStatistics::GetPowerDatafile | ( | ) |
Get the Power output data.
| Gnuplot2dDataset NodeStatistics::GetRxDatafile | ( | ) |
Get the RX state output data.
Definition at line 407 of file wifi-power-adaptation-interference.cc.
References m_output_rx.
| Gnuplot2dDataset NodeStatistics::GetTxDatafile | ( | ) |
Get the TX state output data.
Definition at line 413 of file wifi-power-adaptation-interference.cc.
References m_output_tx.
Callback called by WifiNetDevice/Phy/PhyTxBegin.
| path | The trace path. |
| packet | The sent packet. |
| powerW | The Tx power. |
Definition at line 278 of file wifi-power-adaptation-distance.cc.
References ns3::WifiMacHeader::GetAddr1(), GetCalcTxTime(), ns3::Time::GetSeconds(), ns3::WifiMacHeader::GetType(), m_currentPower, m_currentRate, m_totalEnergy, m_totalTime, and ns3::WIFI_MAC_DATA.
Here is the call graph for this function:Callback called by WifiNetDevice/Phy/PhyTxBegin.
| path | The trace path. |
| packet | The sent packet. |
| powerW | The Tx power. |
| void NodeStatistics::PowerCallback | ( | std::string | path, |
| double | oldPower, | ||
| double | newPower, | ||
| Mac48Address | dest | ||
| ) |
Callback called by WifiNetDevice/RemoteStationManager/x/PowerChange.
| path | The trace path. |
| oldPower | Old Tx power. |
| newPower | Actual Tx power. |
| dest | Destination of the transmission. |
Definition at line 293 of file wifi-power-adaptation-distance.cc.
References m_currentPower.
| void NodeStatistics::PowerCallback | ( | std::string | path, |
| double | oldPower, | ||
| double | newPower, | ||
| Mac48Address | dest | ||
| ) |
Callback called by WifiNetDevice/RemoteStationManager/x/PowerChange.
| path | The trace path. |
| oldPower | Old Tx power. |
| newPower | Actual Tx power. |
| dest | Destination of the transmission. |
| void NodeStatistics::RateCallback | ( | std::string | path, |
| DataRate | oldRate, | ||
| DataRate | newRate, | ||
| Mac48Address | dest | ||
| ) |
Callback called by WifiNetDevice/RemoteStationManager/x/RateChange.
| path | The trace path. |
| oldRate | Old rate. |
| newRate | Actual rate. |
| dest | Destination of the transmission. |
Definition at line 299 of file wifi-power-adaptation-distance.cc.
References m_currentRate.
| void NodeStatistics::RateCallback | ( | std::string | path, |
| DataRate | oldRate, | ||
| DataRate | newRate, | ||
| Mac48Address | dest | ||
| ) |
Callback called by WifiNetDevice/RemoteStationManager/x/RateChange.
| path | The trace path. |
| oldRate | Old rate. |
| newRate | Actual rate. |
| dest | Destination of the transmission. |
| void NodeStatistics::RxCallback | ( | std::string | path, |
| Ptr< const Packet > | packet, | ||
| const Address & | from | ||
| ) |
Callback called by PacketSink/Rx.
| path | The trace path. |
| packet | The received packet. |
| from | The sender address. |
Definition at line 308 of file wifi-power-adaptation-distance.cc.
References m_bytesTotal.
| void NodeStatistics::RxCallback | ( | std::string | path, |
| Ptr< const Packet > | packet, | ||
| const Address & | from | ||
| ) |
Callback called by PacketSink/Rx.
| path | The trace path. |
| packet | The received packet. |
| from | The sender address. |
| void NodeStatistics::RxCallback | ( | std::string | path, |
| Ptr< const Packet > | packet, | ||
| const Address & | from | ||
| ) |
RX callback.
| path | path |
| packet | received packet |
| from | sender |
Set the Position of a node.
| node | The node. |
| position | The position. |
Definition at line 314 of file wifi-power-adaptation-distance.cc.
Referenced by AdvancePosition().
Here is the caller graph for this function:Set node position.
| node | the node |
| position | the position |
Setup the WifiPhy object.
| phy | The WifiPhy to setup. |
Definition at line 248 of file wifi-power-adaptation-distance.cc.
References ns3::Time::GetSeconds(), m_timeTable, NS_LOG_DEBUG, packetSize, ns3::WifiTxVector::SetChannelWidth(), ns3::WifiTxVector::SetMode(), ns3::WifiTxVector::SetPreambleType(), and ns3::WIFI_PREAMBLE_LONG.
Referenced by NodeStatistics().
Here is the call graph for this function:
Here is the caller graph for this function:Setup the WifiPhy object.
| phy | The WifiPhy to setup. |
| void NodeStatistics::StateCallback | ( | std::string | path, |
| Time | init, | ||
| Time | duration, | ||
| WifiPhyState | state | ||
| ) |
Callback called by YansWifiPhy/State/State.
| path | The trace path. |
| init | Time when the state started. |
| duration | Amount of time we've been in (or will be in) the state. |
| state | The state. |
Definition at line 329 of file wifi-power-adaptation-interference.cc.
References busyTime, ns3::Time::GetSeconds(), idleTime, m_totalBusyTime, m_totalIdleTime, m_totalRxTime, m_totalTxTime, rxTime, and txTime.
Here is the call graph for this function:
|
private |
BUSY time.
Definition at line 216 of file wifi-power-adaptation-interference.cc.
Referenced by CheckStatistics(), and StateCallback().
|
private |
IDLE time.
Definition at line 217 of file wifi-power-adaptation-interference.cc.
Referenced by CheckStatistics(), and StateCallback().
|
private |
Number of received bytes on a given state.
total bytes
Number of received bytes.
Definition at line 215 of file wifi-power-adaptation-distance.cc.
Referenced by NodeStatistics(), AdvancePosition(), CheckStatistics(), and RxCallback().
|
private |
Current Tx power for each sender.
Definition at line 213 of file wifi-power-adaptation-distance.cc.
Referenced by NodeStatistics(), PhyCallback(), and PowerCallback().
|
private |
Current Tx rate for each sender.
Definition at line 214 of file wifi-power-adaptation-distance.cc.
Referenced by NodeStatistics(), PhyCallback(), and RateCallback().
|
private |
Throughput output data.
gnuplot 2d dataset
Definition at line 219 of file wifi-power-adaptation-distance.cc.
Referenced by NodeStatistics(), AdvancePosition(), CheckStatistics(), and GetDatafile().
|
private |
BUSY output data.
Definition at line 228 of file wifi-power-adaptation-interference.cc.
Referenced by CheckStatistics(), and GetBusyDatafile().
|
private |
IDLE output data.
Definition at line 227 of file wifi-power-adaptation-interference.cc.
Referenced by CheckStatistics(), and GetIdleDatafile().
|
private |
Power output data.
Definition at line 220 of file wifi-power-adaptation-distance.cc.
Referenced by NodeStatistics(), AdvancePosition(), CheckStatistics(), and GetPowerDatafile().
|
private |
RX output data.
Definition at line 229 of file wifi-power-adaptation-interference.cc.
Referenced by CheckStatistics(), and GetRxDatafile().
|
private |
TX output data.
Definition at line 230 of file wifi-power-adaptation-interference.cc.
Referenced by CheckStatistics(), and GetTxDatafile().
|
private |
Time, DataRate table.
Definition at line 218 of file wifi-power-adaptation-distance.cc.
Referenced by GetCalcTxTime(), and SetupPhy().
|
private |
Total time in BUSY state.
Definition at line 220 of file wifi-power-adaptation-interference.cc.
Referenced by GetBusyTime(), and StateCallback().
|
private |
Energy used on a given state.
Energy used.
Definition at line 216 of file wifi-power-adaptation-distance.cc.
Referenced by NodeStatistics(), AdvancePosition(), CheckStatistics(), and PhyCallback().
|
private |
Total time in IDLE state.
Definition at line 221 of file wifi-power-adaptation-interference.cc.
Referenced by StateCallback().
|
private |
Total time in RX state.
Definition at line 223 of file wifi-power-adaptation-interference.cc.
Referenced by GetBusyTime(), and StateCallback().
|
private |
Time spent on a given state.
Time spent.
Definition at line 217 of file wifi-power-adaptation-distance.cc.
Referenced by NodeStatistics(), AdvancePosition(), CheckStatistics(), and PhyCallback().
|
private |
Total time in TX state.
Definition at line 222 of file wifi-power-adaptation-interference.cc.
Referenced by StateCallback().
|
private |
RX time.
Definition at line 219 of file wifi-power-adaptation-interference.cc.
Referenced by CheckStatistics(), and StateCallback().
|
private |
TX time.
Definition at line 218 of file wifi-power-adaptation-interference.cc.
Referenced by CheckStatistics(), and StateCallback().