A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::PhyListener Class Reference

Listener for PHY events. More...

+ Inheritance diagram for ns3::PhyListener:
+ Collaboration diagram for ns3::PhyListener:

Public Member Functions

 PhyListener (ns3::DcfManager *dcf)
 Create a PhyListener for the given DcfManager. More...
 
virtual ~PhyListener ()
 
virtual void NotifyMaybeCcaBusyStart (Time duration)
 
virtual 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...
 
virtual 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...
 
virtual void NotifyRxStart (Time duration)
 
virtual void NotifySwitchingStart (Time duration)
 
virtual void NotifyTxStart (Time duration)
 
- Public Member Functions inherited from ns3::WifiPhyListener
virtual ~WifiPhyListener ()
 

Private Attributes

ns3::DcfManagerm_dcf
 DcfManager to forward events to. More...
 

Detailed Description

Listener for PHY events.

Forwards to DcfManager

Definition at line 215 of file dcf-manager.cc.

Constructor & Destructor Documentation

ns3::PhyListener::PhyListener ( ns3::DcfManager dcf)
inline

Create a PhyListener for the given DcfManager.

Parameters
dcf

Definition at line 223 of file dcf-manager.cc.

virtual ns3::PhyListener::~PhyListener ( )
inlinevirtual

Definition at line 227 of file dcf-manager.cc.

Member Function Documentation

virtual void ns3::PhyListener::NotifyMaybeCcaBusyStart ( Time  duration)
inlinevirtual
Parameters
durationthe 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 246 of file dcf-manager.cc.

References m_dcf, and ns3::DcfManager::NotifyMaybeCcaBusyStartNow().

+ Here is the call graph for this function:

virtual void ns3::PhyListener::NotifyRxEndError ( void  )
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 238 of file dcf-manager.cc.

References m_dcf, and ns3::DcfManager::NotifyRxEndErrorNow().

+ Here is the call graph for this function:

virtual void ns3::PhyListener::NotifyRxEndOk ( void  )
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 234 of file dcf-manager.cc.

References m_dcf, and ns3::DcfManager::NotifyRxEndOkNow().

+ Here is the call graph for this function:

virtual void ns3::PhyListener::NotifyRxStart ( Time  duration)
inlinevirtual
Parameters
durationthe 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:

  • NotifyRxEndOk
  • NotifyRxEndError
  • NotifyTxStart

Implements ns3::WifiPhyListener.

Definition at line 230 of file dcf-manager.cc.

References m_dcf, and ns3::DcfManager::NotifyRxStartNow().

+ Here is the call graph for this function:

virtual void ns3::PhyListener::NotifySwitchingStart ( Time  duration)
inlinevirtual
Parameters
durationthe expected channel switching duration.

We do not send any event to notify the end of channel switching. Listeners should assume that the channel implicitely reverts to the idle or busy states.

Implements ns3::WifiPhyListener.

Definition at line 250 of file dcf-manager.cc.

References m_dcf, and ns3::DcfManager::NotifySwitchingStartNow().

+ Here is the call graph for this function:

virtual void ns3::PhyListener::NotifyTxStart ( Time  duration)
inlinevirtual
Parameters
durationthe expected transmission duration.

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 implicitely reverts to the idle state unless they have received a cca busy report.

Implements ns3::WifiPhyListener.

Definition at line 242 of file dcf-manager.cc.

References m_dcf, and ns3::DcfManager::NotifyTxStartNow().

+ Here is the call graph for this function:

Member Data Documentation

ns3::DcfManager* ns3::PhyListener::m_dcf
private

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