ns3::Ns2ExtWifiPhyStateHelper Class Reference

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

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

List of all members.

Public Member Functions

 Ns2ExtWifiPhyStateHelper ()
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 CallRxStartTrace (Ptr< const Packet > packet, const WifiPhyRxTag &rxTag)
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::Ns2ExtWifiPhyStateHelper.

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 >, const WifiPhyRxTag & > 
m_rxStartTrace
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 31 of file ns2ext-wifi-phy-state-helper.h.


Member Typedef Documentation

Definition at line 62 of file ns2ext-wifi-phy-state-helper.h.


Constructor & Destructor Documentation

ns3::Ns2ExtWifiPhyStateHelper::Ns2ExtWifiPhyStateHelper (  ) 

Definition at line 56 of file ns2ext-wifi-phy-state-helper.cc.

References NS_LOG_FUNCTION.


Member Function Documentation

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

Definition at line 357 of file ns2ext-wifi-phy-state-helper.cc.

References m_rxErrorTrace.

void ns3::Ns2ExtWifiPhyStateHelper::CallRxStartTrace ( Ptr< const Packet packet,
const WifiPhyRxTag rxTag 
)

Definition at line 351 of file ns2ext-wifi-phy-state-helper.cc.

References m_rxStartTrace.

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

Definition at line 152 of file ns2ext-wifi-phy-state-helper.cc.

References m_startRx.

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

Definition at line 118 of file ns2ext-wifi-phy-state-helper.cc.

References m_previousStateChangeTime, and ns3::Now().

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

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

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

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

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

  • State: The state of the PHY layer
  • RxStart: Reception of a packet has started successfully.
  • 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 33 of file ns2ext-wifi-phy-state-helper.cc.

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

bool ns3::Ns2ExtWifiPhyStateHelper::IsStateBusy ( void   ) 

Definition at line 97 of file ns2ext-wifi-phy-state-helper.cc.

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

bool ns3::Ns2ExtWifiPhyStateHelper::IsStateCcaBusy ( void   ) 

Definition at line 86 of file ns2ext-wifi-phy-state-helper.cc.

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

Referenced by DoSwitchFromRx(), and SwitchToRx().

bool ns3::Ns2ExtWifiPhyStateHelper::IsStateIdle ( void   ) 

Definition at line 92 of file ns2ext-wifi-phy-state-helper.cc.

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

Referenced by DoSwitchFromRx(), and SwitchToRx().

bool ns3::Ns2ExtWifiPhyStateHelper::IsStateRx ( void   ) 

Definition at line 107 of file ns2ext-wifi-phy-state-helper.cc.

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

Referenced by DoSwitchFromRx(), and SwitchToRx().

bool ns3::Ns2ExtWifiPhyStateHelper::IsStateSyncing ( void   ) 

Definition at line 102 of file ns2ext-wifi-phy-state-helper.cc.

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

bool ns3::Ns2ExtWifiPhyStateHelper::IsStateTx ( void   ) 

Definition at line 112 of file ns2ext-wifi-phy-state-helper.cc.

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

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

Definition at line 208 of file ns2ext-wifi-phy-state-helper.cc.

References m_listeners.

Referenced by SwitchMaybeToCcaBusy().

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

Definition at line 201 of file ns2ext-wifi-phy-state-helper.cc.

References m_listeners.

Referenced by SwitchFromRxEndError().

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

Definition at line 194 of file ns2ext-wifi-phy-state-helper.cc.

References m_listeners.

Referenced by SwitchFromRxEndOk().

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

Definition at line 187 of file ns2ext-wifi-phy-state-helper.cc.

References m_listeners.

Referenced by SwitchToRx().

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

Definition at line 180 of file ns2ext-wifi-phy-state-helper.cc.

References m_listeners.

Referenced by SwitchToTx().

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

Definition at line 80 of file ns2ext-wifi-phy-state-helper.cc.

References m_listeners.

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

Definition at line 75 of file ns2ext-wifi-phy-state-helper.cc.

References m_rxErrorCallback.

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

Definition at line 70 of file ns2ext-wifi-phy-state-helper.cc.

References m_rxOkCallback.

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

Member Data Documentation

Definition at line 90 of file ns2ext-wifi-phy-state-helper.h.

Referenced by SetReceiveErrorCallback(), and SwitchFromRxEndError().

Definition at line 74 of file ns2ext-wifi-phy-state-helper.h.

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

Definition at line 89 of file ns2ext-wifi-phy-state-helper.h.

Referenced by SetReceiveOkCallback(), and SwitchFromRxEndOk().

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

Referenced by GetTypeId(), and SwitchFromRxEndOk().

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

Referenced by CallRxStartTrace(), and GetTypeId().

Definition at line 78 of file ns2ext-wifi-phy-state-helper.h.

Referenced by SwitchToTx().

Definition at line 88 of file ns2ext-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:16 2009 for NS-3 by  doxygen 1.6.3