ns3::YansWifiPhyStateHelper Class Reference

#include <yans-wifi-phy-state-helper.h>

Inheritance diagram for ns3::YansWifiPhyStateHelper:
Inheritance graph
[legend]
Collaboration diagram for ns3::YansWifiPhyStateHelper:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 YansWifiPhyStateHelper ()
void SetReceiveOkCallback (WifiPhy::RxOkCallback callback)
void SetReceiveErrorCallback (WifiPhy::RxErrorCallback callback)
void RegisterListener (WifiPhyListener *listener)
enum WifiPhy::State GetState (void)
bool IsStateCcaBusy (void)
bool IsStateIdle (void)
bool IsStateBusy (void)
bool IsStateSyncing (void)
bool IsStateRx (void)
bool IsStateTx (void)
Time GetStateDuration (void)
Time GetDelayUntilIdle (void)
Time GetLastRxStartTime (void) const
void SwitchToTx (Ptr< const Packet > packet, Time txDuration)
void SwitchToRx (Time rxDuration)
void SwitchFromRxEndOk (Ptr< Packet > packet)
void SwitchFromRxEndError (Ptr< const Packet > packet)
void SwitchMaybeToCcaBusy (Time duration)
void CallRxErrorTrace (Ptr< const Packet > packet, WifiPhy::RxErrorReason rxErrorReason)

Static Public Member Functions

static TypeId GetTypeId (void)
 This method returns the TypeId associated to ns3::YansWifiPhyStateHelper.

Private Types

typedef std::vector
< WifiPhyListener * > 
Listeners

Private Member Functions

void LogPreviousIdleAndCcaBusyStates (void)
void NotifyTxStart (Time duration)
void NotifyWakeup (void)
void NotifyRxStart (Time duration)
void NotifyRxEndOk (void)
void NotifyRxEndError (void)
void NotifyMaybeCcaBusyStart (Time duration)
void DoSwitchFromRx (void)

Private Attributes

bool m_rxing
Time m_endTx
Time m_endRx
Time m_endCcaBusy
Time m_startTx
Time m_startRx
Time m_startCcaBusy
Time m_previousStateChangeTime
Listeners m_listeners
TracedCallback< Time, Time,
enum WifiPhy::State
m_stateLogger
TracedCallback< Ptr< const
Packet > > 
m_rxOkTrace
TracedCallback< Ptr< const
Packet >
, WifiPhy::RxErrorReason
m_rxErrorTrace
TracedCallback< Ptr< const
Packet > > 
m_txTrace
WifiPhy::RxOkCallback m_rxOkCallback
WifiPhy::RxErrorCallback m_rxErrorCallback

Detailed Description

Definition at line 30 of file yans-wifi-phy-state-helper.h.


Member Typedef Documentation

typedef std::vector<WifiPhyListener *> ns3::YansWifiPhyStateHelper::Listeners [private]

Definition at line 60 of file yans-wifi-phy-state-helper.h.


Constructor & Destructor Documentation

ns3::YansWifiPhyStateHelper::YansWifiPhyStateHelper (  ) 

Definition at line 52 of file yans-wifi-phy-state-helper.cc.

References NS_LOG_FUNCTION.


Member Function Documentation

void ns3::YansWifiPhyStateHelper::CallRxErrorTrace ( Ptr< const Packet packet,
WifiPhy::RxErrorReason  rxErrorReason 
)

Definition at line 347 of file yans-wifi-phy-state-helper.cc.

References m_rxErrorTrace.

void ns3::YansWifiPhyStateHelper::DoSwitchFromRx ( void   )  [private]
Time ns3::YansWifiPhyStateHelper::GetDelayUntilIdle ( void   ) 
Time ns3::YansWifiPhyStateHelper::GetLastRxStartTime ( void   )  const

Definition at line 148 of file yans-wifi-phy-state-helper.cc.

References m_startRx.

enum WifiPhy::State ns3::YansWifiPhyStateHelper::GetState ( void   ) 
Time ns3::YansWifiPhyStateHelper::GetStateDuration ( void   ) 

Definition at line 114 of file yans-wifi-phy-state-helper.cc.

References m_previousStateChangeTime, and ns3::Now().

TypeId ns3::YansWifiPhyStateHelper::GetTypeId ( void   )  [static]

This method returns the TypeId associated to ns3::YansWifiPhyStateHelper.

This object is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/DeviceList/[i]/$ns3WifiNetDevice/Phy/$ns3YansWifiPhy/State

No Attributes defined for this type.
TraceSources defined for this type:

  • State: The state of the PHY layer
  • RxOk: A packet has been received successfully.
  • RxError: A packet has been received unsuccessfully.
  • Tx: Packet transmission is starting.

Reimplemented from ns3::Object.

Definition at line 32 of file yans-wifi-phy-state-helper.cc.

References ns3::TypeId::AddTraceSource(), m_rxErrorTrace, m_rxOkTrace, m_stateLogger, m_txTrace, ns3::MakeTraceSourceAccessor(), and ns3::TypeId::SetParent().

bool ns3::YansWifiPhyStateHelper::IsStateBusy ( void   ) 

Definition at line 93 of file yans-wifi-phy-state-helper.cc.

References GetState(), and ns3::WifiPhy::IDLE.

bool ns3::YansWifiPhyStateHelper::IsStateCcaBusy ( void   ) 

Definition at line 82 of file yans-wifi-phy-state-helper.cc.

References ns3::WifiPhy::CCA_BUSY, and GetState().

Referenced by DoSwitchFromRx(), and SwitchToRx().

bool ns3::YansWifiPhyStateHelper::IsStateIdle ( void   ) 

Definition at line 88 of file yans-wifi-phy-state-helper.cc.

References GetState(), and ns3::WifiPhy::IDLE.

Referenced by DoSwitchFromRx(), and SwitchToRx().

bool ns3::YansWifiPhyStateHelper::IsStateRx ( void   ) 

Definition at line 103 of file yans-wifi-phy-state-helper.cc.

References GetState(), and ns3::WifiPhy::RX.

Referenced by DoSwitchFromRx(), and SwitchToRx().

bool ns3::YansWifiPhyStateHelper::IsStateSyncing ( void   ) 

Definition at line 98 of file yans-wifi-phy-state-helper.cc.

References GetState(), and ns3::WifiPhy::SYNCING.

bool ns3::YansWifiPhyStateHelper::IsStateTx ( void   ) 

Definition at line 108 of file yans-wifi-phy-state-helper.cc.

References GetState(), and ns3::WifiPhy::TX.

void ns3::YansWifiPhyStateHelper::LogPreviousIdleAndCcaBusyStates ( void   )  [private]
void ns3::YansWifiPhyStateHelper::NotifyMaybeCcaBusyStart ( Time  duration  )  [private]

Definition at line 204 of file yans-wifi-phy-state-helper.cc.

References m_listeners.

Referenced by SwitchMaybeToCcaBusy().

void ns3::YansWifiPhyStateHelper::NotifyRxEndError ( void   )  [private]

Definition at line 197 of file yans-wifi-phy-state-helper.cc.

References m_listeners.

Referenced by SwitchFromRxEndError().

void ns3::YansWifiPhyStateHelper::NotifyRxEndOk ( void   )  [private]

Definition at line 190 of file yans-wifi-phy-state-helper.cc.

References m_listeners.

Referenced by SwitchFromRxEndOk().

void ns3::YansWifiPhyStateHelper::NotifyRxStart ( Time  duration  )  [private]

Definition at line 183 of file yans-wifi-phy-state-helper.cc.

References m_listeners.

Referenced by SwitchToRx().

void ns3::YansWifiPhyStateHelper::NotifyTxStart ( Time  duration  )  [private]

Definition at line 176 of file yans-wifi-phy-state-helper.cc.

References m_listeners.

Referenced by SwitchToTx().

void ns3::YansWifiPhyStateHelper::NotifyWakeup ( void   )  [private]
void ns3::YansWifiPhyStateHelper::RegisterListener ( WifiPhyListener listener  ) 

Definition at line 76 of file yans-wifi-phy-state-helper.cc.

References m_listeners.

void ns3::YansWifiPhyStateHelper::SetReceiveErrorCallback ( WifiPhy::RxErrorCallback  callback  ) 

Definition at line 71 of file yans-wifi-phy-state-helper.cc.

References m_rxErrorCallback.

void ns3::YansWifiPhyStateHelper::SetReceiveOkCallback ( WifiPhy::RxOkCallback  callback  ) 

Definition at line 66 of file yans-wifi-phy-state-helper.cc.

References m_rxOkCallback.

void ns3::YansWifiPhyStateHelper::SwitchFromRxEndError ( Ptr< const Packet packet  ) 
void ns3::YansWifiPhyStateHelper::SwitchFromRxEndOk ( Ptr< Packet packet  ) 
void ns3::YansWifiPhyStateHelper::SwitchMaybeToCcaBusy ( Time  duration  ) 
void ns3::YansWifiPhyStateHelper::SwitchToRx ( Time  rxDuration  ) 
void ns3::YansWifiPhyStateHelper::SwitchToTx ( Ptr< const Packet packet,
Time  txDuration 
)

Member Data Documentation

Definition at line 87 of file yans-wifi-phy-state-helper.h.

Referenced by SetReceiveErrorCallback(), and SwitchFromRxEndError().

Definition at line 84 of file yans-wifi-phy-state-helper.h.

Referenced by CallRxErrorTrace(), GetTypeId(), and SwitchFromRxEndError().

Definition at line 72 of file yans-wifi-phy-state-helper.h.

Referenced by DoSwitchFromRx(), GetState(), SwitchToRx(), and SwitchToTx().

Definition at line 86 of file yans-wifi-phy-state-helper.h.

Referenced by SetReceiveOkCallback(), and SwitchFromRxEndOk().

Definition at line 83 of file yans-wifi-phy-state-helper.h.

Referenced by GetTypeId(), and SwitchFromRxEndOk().

Definition at line 76 of file yans-wifi-phy-state-helper.h.

Referenced by SwitchToTx().

Definition at line 85 of file yans-wifi-phy-state-helper.h.

Referenced by GetTypeId(), and SwitchToTx().


The documentation for this class was generated from the following files:
Generated on Thu Dec 3 14:11:30 2009 for NS-3 by  doxygen 1.6.3