Listener for PHY events. More...
Public Member Functions | |
PhyListener (ns3::ChannelAccessManager *cam) | |
Create a PhyListener for the given ChannelAccessManager. More... | |
virtual | ~PhyListener () |
void | NotifyMaybeCcaBusyStart (Time duration) |
void | NotifyOff (void) |
Notify listeners that we went to switch off. More... | |
void | NotifyOn (void) |
Notify listeners that we went to switch on. More... | |
void | NotifyRxEndError (void) |
We have received the last bit of a packet for which NotifyRxStart was invoked first and, the packet has not been successfully received. More... | |
void | NotifyRxEndOk (void) |
We have received the last bit of a packet for which NotifyRxStart was invoked first and, the packet has been successfully received. More... | |
void | NotifyRxStart (Time duration) |
void | NotifySleep (void) |
Notify listeners that we went to sleep. More... | |
void | NotifySwitchingStart (Time duration) |
void | NotifyTxStart (Time duration, double txPowerDbm) |
void | NotifyWakeup (void) |
Notify listeners that we woke up. More... | |
Public Member Functions inherited from ns3::WifiPhyListener | |
virtual | ~WifiPhyListener () |
Private Attributes | |
ns3::ChannelAccessManager * | m_cam |
ChannelAccessManager to forward events to. More... | |
Listener for PHY events.
Forwards to ChannelAccessManager
Definition at line 36 of file channel-access-manager.cc.
|
inline |
Create a PhyListener for the given ChannelAccessManager.
cam | the ChannelAccessManager |
Definition at line 44 of file channel-access-manager.cc.
|
inlinevirtual |
Definition at line 48 of file channel-access-manager.cc.
|
inlinevirtual |
duration | the expected busy duration. |
This method does not really report a real state change as opposed to the other methods in this class. It merely reports that, unless the medium is reported busy through NotifyTxStart or NotifyRxStart/End, it will be busy as defined by the currently selected CCA mode.
Typical client code which wants to have a clear picture of the CCA state will need to keep track of the time at which the last NotifyCcaBusyStart method is called and what duration it reported.
Implements ns3::WifiPhyListener.
Definition at line 67 of file channel-access-manager.cc.
References m_cam, and ns3::ChannelAccessManager::NotifyMaybeCcaBusyStartNow().
|
inlinevirtual |
Notify listeners that we went to switch off.
Implements ns3::WifiPhyListener.
Definition at line 79 of file channel-access-manager.cc.
References m_cam, and ns3::ChannelAccessManager::NotifyOffNow().
|
inlinevirtual |
Notify listeners that we went to switch on.
Implements ns3::WifiPhyListener.
Definition at line 87 of file channel-access-manager.cc.
References m_cam, and ns3::ChannelAccessManager::NotifyOnNow().
|
inlinevirtual |
We have received the last bit of a packet for which NotifyRxStart was invoked first and, the packet has not been successfully received.
Implements ns3::WifiPhyListener.
Definition at line 59 of file channel-access-manager.cc.
References m_cam, and ns3::ChannelAccessManager::NotifyRxEndErrorNow().
|
inlinevirtual |
We have received the last bit of a packet for which NotifyRxStart was invoked first and, the packet has been successfully received.
Implements ns3::WifiPhyListener.
Definition at line 55 of file channel-access-manager.cc.
References m_cam, and ns3::ChannelAccessManager::NotifyRxEndOkNow().
|
inlinevirtual |
duration | the expected duration of the packet reception. |
We have received the first bit of a packet. We decided that we could synchronize on this packet. It does not mean we will be able to successfully receive completely the whole packet. It means that we will report a BUSY status until one of the following happens:
Implements ns3::WifiPhyListener.
Definition at line 51 of file channel-access-manager.cc.
References m_cam, and ns3::ChannelAccessManager::NotifyRxStartNow().
|
inlinevirtual |
Notify listeners that we went to sleep.
Implements ns3::WifiPhyListener.
Definition at line 75 of file channel-access-manager.cc.
References m_cam, and ns3::ChannelAccessManager::NotifySleepNow().
|
inlinevirtual |
duration | the expected channel switching duration. |
We do not send any event to notify the end of channel switching. Listeners should assume that the channel implicitly reverts to the idle or busy states.
Implements ns3::WifiPhyListener.
Definition at line 71 of file channel-access-manager.cc.
References m_cam, and ns3::ChannelAccessManager::NotifySwitchingStartNow().
|
inlinevirtual |
duration | the expected transmission duration. |
txPowerDbm | the nominal TX power in dBm |
We are about to send the first bit of the packet. We do not send any event to notify the end of transmission. Listeners should assume that the channel implicitly reverts to the idle state unless they have received a CCA busy report.
Implements ns3::WifiPhyListener.
Definition at line 63 of file channel-access-manager.cc.
References m_cam, and ns3::ChannelAccessManager::NotifyTxStartNow().
|
inlinevirtual |
Notify listeners that we woke up.
Implements ns3::WifiPhyListener.
Definition at line 83 of file channel-access-manager.cc.
References m_cam, and ns3::ChannelAccessManager::NotifyWakeupNow().
|
private |
ChannelAccessManager to forward events to.
Definition at line 93 of file channel-access-manager.cc.
Referenced by NotifyMaybeCcaBusyStart(), NotifyOff(), NotifyOn(), NotifyRxEndError(), NotifyRxEndOk(), NotifyRxStart(), NotifySleep(), NotifySwitchingStart(), NotifyTxStart(), and NotifyWakeup().