ns-3
ns3::WifiRadioEnergyModelPhyListener Class Reference

#include <wifi-radio-energy-model.h>

Inheritance diagram for ns3::WifiRadioEnergyModelPhyListener:
Collaboration diagram for ns3::WifiRadioEnergyModelPhyListener:

List of all members.

Public Member Functions

void SetChangeStateCallback (DeviceEnergyModel::ChangeStateCallback callback)
 Sets the change state callback. Used by helper class.
virtual void NotifyRxStart (Time duration)
 Switches the WifiRadioEnergyModel to RX state.
virtual void NotifyRxEndOk (void)
 Switches the WifiRadioEnergyModel back to IDLE state.
virtual void NotifyRxEndError (void)
 Switches the WifiRadioEnergyModel back to IDLE state.
virtual void NotifyTxStart (Time duration)
 Switches the WifiRadioEnergyModel to TX state and switches back to IDLE after TX duration.
virtual void NotifyMaybeCcaBusyStart (Time duration)
virtual void NotifySwitchingStart (Time duration)

Detailed Description

A WifiPhy listener class for notifying the WifiRadioEnergyModel of Wifi radio state change.


Member Function Documentation

Parameters:
durationthe expected busy duration.

Defined in ns3::WifiPhyListener

Implements ns3::WifiPhyListener.

References ns3::EventId::Cancel(), ns3::WifiPhy::CCA_BUSY, NS_FATAL_ERROR, and ns3::Simulator::Schedule().

Switches the WifiRadioEnergyModel back to IDLE state.

Defined in ns3::WifiPhyListener

Note that for the WifiRadioEnergyModel, the behavior of the function is the same as NotifyRxEndOk.

Implements ns3::WifiPhyListener.

References ns3::WifiPhy::IDLE, and NS_FATAL_ERROR.

Switches the WifiRadioEnergyModel back to IDLE state.

Defined in ns3::WifiPhyListener

Note that for the WifiRadioEnergyModel, the behavior of the function is the same as NotifyRxEndError.

Implements ns3::WifiPhyListener.

References ns3::WifiPhy::IDLE, and NS_FATAL_ERROR.

Switches the WifiRadioEnergyModel to RX state.

Parameters:
durationthe expected duration of the packet reception.

Defined in ns3::WifiPhyListener

Implements ns3::WifiPhyListener.

References ns3::EventId::Cancel(), NS_FATAL_ERROR, and ns3::WifiPhy::RX.

Parameters:
durationthe expected channel switching duration.

Defined in ns3::WifiPhyListener

Implements ns3::WifiPhyListener.

References ns3::EventId::Cancel(), NS_FATAL_ERROR, ns3::Simulator::Schedule(), and ns3::WifiPhy::SWITCHING.

Switches the WifiRadioEnergyModel to TX state and switches back to IDLE after TX duration.

Parameters:
durationthe expected transmission duration.

Defined in ns3::WifiPhyListener

Implements ns3::WifiPhyListener.

References ns3::EventId::Cancel(), NS_FATAL_ERROR, ns3::Simulator::Schedule(), and ns3::WifiPhy::TX.

Sets the change state callback. Used by helper class.

Parameters:
callbackChange state callback.

References NS_ASSERT.


The documentation for this class was generated from the following files: