FrameExchangeManager is a base class handling the basic frame exchange sequences for non-QoS stations. More...
#include "frame-exchange-manager.h"
Public Member Functions | |
FrameExchangeManager () | |
virtual | ~FrameExchangeManager () |
virtual void | CalculateAcknowledgmentTime (WifiAcknowledgment *acknowledgment) const |
Calculate the time required to acknowledge a frame according to the given acknowledgment method. More... | |
virtual void | CalculateProtectionTime (WifiProtection *protection) const |
Calculate the time required to protect a frame according to the given protection method. More... | |
Ptr< WifiAckManager > | GetAckManager (void) const |
Get the Acknowledgment Manager used by this node. More... | |
Ptr< WifiProtectionManager > | GetProtectionManager (void) const |
Get the Protection Manager used by this node. More... | |
bool | IsPromisc (void) const |
Check if the device is operating in promiscuous mode. More... | |
void | NotifyOffNow (void) |
This method is typically invoked by the PhyMacLowListener to notify the MAC layer that the device has been put into off mode. More... | |
void | NotifySleepNow (void) |
This method is typically invoked by the PhyMacLowListener to notify the MAC layer that the device has been put into sleep mode. More... | |
void | NotifySwitchingStartNow (Time duration) |
void | Receive (Ptr< WifiPsdu > psdu, RxSignalInfo rxSignalInfo, WifiTxVector txVector, std::vector< bool > perMpduStatus) |
This method is intended to be called by the PHY layer every time an MPDU is received and also when the reception of an A-MPDU is completed. More... | |
virtual void | ResetPhy (void) |
Remove WifiPhy associated with this MacLow. More... | |
virtual void | SetAckManager (Ptr< WifiAckManager > ackManager) |
Set the Acknowledgment Manager to use. More... | |
virtual void | SetAddress (Mac48Address address) |
Set the MAC address. More... | |
virtual void | SetBssid (Mac48Address bssid) |
Set the Basic Service Set Identification. More... | |
virtual void | SetChannelAccessManager (const Ptr< ChannelAccessManager > channelAccessManager) |
Set the channel access manager to use. More... | |
virtual void | SetMacRxMiddle (const Ptr< MacRxMiddle > rxMiddle) |
Set the MAC RX Middle to use. More... | |
virtual void | SetMacTxMiddle (const Ptr< MacTxMiddle > txMiddle) |
Set the MAC TX Middle to use. More... | |
void | SetPromisc (void) |
Enable promiscuous mode. More... | |
virtual void | SetProtectionManager (Ptr< WifiProtectionManager > protectionManager) |
Set the Protection Manager to use. More... | |
virtual void | SetWifiMac (const Ptr< RegularWifiMac > mac) |
Set the MAC layer to use. More... | |
virtual void | SetWifiPhy (const Ptr< WifiPhy > phy) |
Set the PHY layer to use. More... | |
virtual bool | StartTransmission (Ptr< Txop > dcf) |
Request the FrameExchangeManager to start a frame exchange sequence. More... | |
![]() | |
Object () | |
Constructor. More... | |
virtual | ~Object () |
Destructor. More... | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. More... | |
void | Dispose (void) |
Dispose of this Object. More... | |
AggregateIterator | GetAggregateIterator (void) const |
Get an iterator to the Objects aggregated to this one. More... | |
virtual TypeId | GetInstanceTypeId (void) const |
Get the most derived TypeId for this Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (void) const |
Get a pointer to the requested aggregated Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. More... | |
template<> | |
Ptr< Object > | GetObject () const |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
void | Initialize (void) |
Invoke DoInitialize on all Objects aggregated to this one. More... | |
bool | IsInitialized (void) const |
Check if the object has been initialized. More... | |
![]() | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. More... | |
void | Ref (void) const |
Increment the reference count. More... | |
void | Unref (void) const |
Decrement the reference count. More... | |
![]() | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
Get the value of an attribute, raising fatal errors if unsuccessful. More... | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising erros. More... | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. More... | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. More... | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. More... | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. More... | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. More... | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Register this type. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Protected Member Functions | |
virtual void | CtsTimeout (void) |
Called when the CTS timeout expires. More... | |
virtual void | DequeueMpdu (Ptr< WifiMacQueueItem > mpdu) |
Dequeue the given MPDU from the queue in which it is stored. More... | |
virtual void | DoDispose () |
Destructor implementation. More... | |
void | DoSendCtsAfterRts (const WifiMacHeader &rtsHdr, WifiTxVector &ctsTxVector, double rtsSnr) |
Send CTS after receiving RTS. More... | |
virtual void | EndReceiveAmpdu (Ptr< const WifiPsdu > psdu, double rxSnr, const WifiTxVector &txVector, const std::vector< bool > &perMpduStatus) |
This method is called when the reception of an A-MPDU including multiple MPDUs is completed. More... | |
virtual void | ForwardMpduDown (Ptr< WifiMacQueueItem > mpdu, WifiTxVector &txVector) |
Forward an MPDU down to the PHY layer. More... | |
virtual Time | GetCtsToSelfDurationId (const WifiTxVector &ctsTxVector, Time txDuration, Time response) const |
Compute how to set the Duration/ID field of a CTS-to-self frame to send to protect a frame transmitted with the given TX vector. More... | |
Ptr< WifiMacQueueItem > | GetFirstFragmentIfNeeded (Ptr< WifiMacQueueItem > mpdu) |
Fragment the given MPDU if needed. More... | |
virtual Time | GetFrameDurationId (const WifiMacHeader &header, uint32_t size, const WifiTxParameters &txParams, Ptr< Packet > fragmentedPacket) const |
Compute how to set the Duration/ID field of a frame being transmitted with the given TX parameters. More... | |
Ptr< WifiMacQueueItem > | GetNextFragment (void) |
Get the next fragment of the current MSDU. More... | |
virtual Time | GetRtsDurationId (const WifiTxVector &rtsTxVector, Time txDuration, Time response) const |
Compute how to set the Duration/ID field of an RTS frame to send to protect a frame transmitted with the given TX vector. More... | |
virtual Time | GetTxDuration (uint32_t ppduPayloadSize, Mac48Address receiver, const WifiTxParameters &txParams) const |
Get the updated TX duration of the frame associated with the given TX parameters if the size of the PSDU addressed to the given receiver becomes ppduPayloadSize. More... | |
virtual void | NavResetTimeout (void) |
Reset the NAV upon expiration of the NAV reset timer. More... | |
void | NormalAckTimeout (Ptr< WifiMacQueueItem > mpdu) |
Called when the Ack timeout expires. More... | |
virtual void | NotifyPacketDiscarded (Ptr< const WifiMacQueueItem > mpdu) |
Pass the packet included in the given MPDU to the packet dropped callback. More... | |
virtual void | NotifyReceivedNormalAck (Ptr< WifiMacQueueItem > mpdu) |
Notify other components that an MPDU was acknowledged. More... | |
virtual void | PreProcessFrame (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector) |
Perform actions that are possibly needed when receiving any frame, independently of whether the frame is addressed to this station (e.g., setting the NAV or the TXOP holder). More... | |
virtual void | ReceivedNormalAck (Ptr< WifiMacQueueItem > mpdu, const WifiTxVector &txVector, const WifiTxVector &ackTxVector, RxSignalInfo rxSignalInfo, double snr) |
Perform the actions needed when a Normal Ack is received. More... | |
virtual void | ReceiveMpdu (Ptr< WifiMacQueueItem > mpdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, bool inAmpdu) |
This method handles the reception of an MPDU (possibly included in an A-MPDU) More... | |
virtual void | RetransmitMpduAfterMissedAck (Ptr< WifiMacQueueItem > mpdu) const |
Retransmit an MPDU that was not acknowledged. More... | |
virtual void | RetransmitMpduAfterMissedCts (Ptr< WifiMacQueueItem > mpdu) const |
Retransmit an MPDU that was not sent because a CTS was not received. More... | |
void | SendCtsAfterRts (const WifiMacHeader &rtsHdr, WifiMode rtsTxMode, double rtsSnr) |
Send CTS after receiving RTS. More... | |
void | SendCtsToSelf (const WifiTxParameters &txParams) |
Send CTS for a CTS-to-self mechanism. More... | |
void | SendMpduWithProtection (Ptr< WifiMacQueueItem > mpdu, WifiTxParameters &txParams) |
Send an MPDU with the given TX parameters (with the specified protection). More... | |
void | SendNormalAck (const WifiMacHeader &hdr, const WifiTxVector &dataTxVector, double dataSnr) |
Send Normal Ack. More... | |
void | SendRts (const WifiTxParameters &txParams) |
Send RTS to begin RTS-CTS-Data-Ack transaction. More... | |
virtual void | TransmissionFailed (void) |
Take necessary actions upon a transmission failure. More... | |
virtual void | TransmissionSucceeded (void) |
Take necessary actions upon a transmission success. More... | |
virtual void | UpdateNav (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector) |
Update the NAV, if needed, based on the Duration/ID of the given psdu. More... | |
void | UpdateTxDuration (Mac48Address receiver, WifiTxParameters &txParams) const |
Update the TX duration field of the given TX parameters after that the PSDU addressed to the given receiver has changed. More... | |
![]() | |
Object (const Object &o) | |
Copy an Object. More... | |
virtual void | DoInitialize (void) |
Initialize() implementation. More... | |
virtual void | NotifyNewAggregate (void) |
Notify all Objects aggregated to this one of a new Object being aggregated. More... | |
![]() | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. More... | |
virtual void | NotifyConstructionCompleted (void) |
Notifier called once the ObjectBase is fully constructed. More... | |
Protected Attributes | |
Mac48Address | m_bssid |
BSSID address (Mac48Address) More... | |
Ptr< ChannelAccessManager > | m_channelAccessManager |
the channel access manager More... | |
Ptr< Txop > | m_dcf |
the DCF/EDCAF that gained channel access More... | |
Ptr< RegularWifiMac > | m_mac |
the MAC layer on this station More... | |
Time | m_navEnd |
NAV expiration time. More... | |
EventId | m_navResetEvent |
the event to reset the NAV after an RTS More... | |
Ptr< WifiPhy > | m_phy |
the PHY layer on this station More... | |
bool | m_promisc |
Flag if the device is operating in promiscuous mode. More... | |
Ptr< MacRxMiddle > | m_rxMiddle |
the MAC RX Middle on this station More... | |
Mac48Address | m_self |
the MAC address of this device More... | |
Ptr< MacTxMiddle > | m_txMiddle |
the MAC TX Middle on this station More... | |
WifiTxTimer | m_txTimer |
the timer set upon frame transmission More... | |
Private Member Functions | |
virtual void | Reset (void) |
Reset this frame exchange manager. More... | |
void | RxStartIndication (WifiTxVector txVector, Time psduDuration) |
void | SendMpdu (void) |
Send the current MPDU, which can be acknowledged by a Normal Ack. More... | |
Private Attributes | |
Ptr< WifiAckManager > | m_ackManager |
Acknowledgment manager. More... | |
TypeId | m_acknowledgmentManagerTypeId |
TypeId of the acknowledgment manager to install. More... | |
Ptr< Packet > | m_fragmentedPacket |
the MSDU being fragmented More... | |
bool | m_moreFragments |
true if a fragment has to be sent after a SIFS More... | |
Ptr< WifiMacQueueItem > | m_mpdu |
the MPDU being transmitted More... | |
Ptr< WifiProtectionManager > | m_protectionManager |
Protection manager. More... | |
TypeId | m_protectionManagerTypeId |
TypeId of the protection manager to install. More... | |
WifiTxParameters | m_txParams |
the TX parameters for the current frame More... | |
Additional Inherited Members | |
![]() | |
static TypeId | GetObjectIid (void) |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
FrameExchangeManager is a base class handling the basic frame exchange sequences for non-QoS stations.
Introspection did not find any typical Config paths.
No Attributes are defined for this type.
No TraceSources are defined for this type.
Size of this type is 392 bytes (on a 64-bit architecture).
Definition at line 49 of file frame-exchange-manager.h.
ns3::FrameExchangeManager::FrameExchangeManager | ( | ) |
Definition at line 57 of file frame-exchange-manager.cc.
References NS_LOG_FUNCTION.
|
virtual |
Definition at line 65 of file frame-exchange-manager.cc.
References NS_LOG_FUNCTION_NOARGS.
|
virtual |
Calculate the time required to acknowledge a frame according to the given acknowledgment method.
The acknowledgment time is stored in the acknowledgment object itself.
acknowledgment | the acknowledgment method |
Reimplemented in ns3::HtFrameExchangeManager.
Definition at line 472 of file frame-exchange-manager.cc.
References ns3::WifiAcknowledgment::acknowledgmentTime, ns3::WifiNormalAck::ackTxVector, ns3::WifiPhy::CalculateTxDuration(), ns3::GetAckSize(), ns3::WifiPhy::GetPhyBand(), ns3::WifiPhy::GetSifs(), m_phy, ns3::WifiAcknowledgment::method, ns3::WifiAcknowledgment::NONE, ns3::WifiAcknowledgment::NORMAL_ACK, NS_ASSERT, NS_LOG_FUNCTION, and ns3::Seconds().
Referenced by ns3::HtFrameExchangeManager::CalculateAcknowledgmentTime(), SendMpduWithProtection(), and ns3::QosFrameExchangeManager::TryAddMpdu().
|
virtual |
Calculate the time required to protect a frame according to the given protection method.
The protection time is stored in the protection object itself.
protection | the protection method |
Definition at line 443 of file frame-exchange-manager.cc.
References ns3::WifiPhy::CalculateTxDuration(), ns3::WifiProtection::CTS_TO_SELF, ns3::WifiRtsCtsProtection::ctsTxVector, ns3::WifiCtsToSelfProtection::ctsTxVector, ns3::GetCtsSize(), ns3::WifiPhy::GetPhyBand(), ns3::GetRtsSize(), ns3::WifiPhy::GetSifs(), m_phy, ns3::WifiProtection::method, ns3::WifiProtection::NONE, NS_ASSERT, NS_LOG_FUNCTION, ns3::WifiProtection::protectionTime, ns3::WifiProtection::RTS_CTS, ns3::WifiRtsCtsProtection::rtsTxVector, and ns3::Seconds().
Referenced by ns3::QosFrameExchangeManager::TryAddMpdu(), and ns3::HtFrameExchangeManager::TryAggregateMsdu().
|
protectedvirtual |
Called when the CTS timeout expires.
Reimplemented in ns3::HtFrameExchangeManager.
Definition at line 787 of file frame-exchange-manager.cc.
References DequeueMpdu(), ns3::WifiMacQueueItem::GetHeader(), m_dcf, m_mac, m_mpdu, NotifyPacketDiscarded(), NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Txop::ResetCw(), RetransmitMpduAfterMissedCts(), TransmissionFailed(), and ns3::Txop::UpdateFailedCw().
Referenced by ns3::HtFrameExchangeManager::CtsTimeout(), and SendRts().
|
protectedvirtual |
Dequeue the given MPDU from the queue in which it is stored.
mpdu | the given MPDU |
Reimplemented in ns3::HtFrameExchangeManager.
Definition at line 430 of file frame-exchange-manager.cc.
References ns3::WifiMacQueue::Dequeue(), ns3::WifiMacQueueItem::GetQueueIteratorPairs(), ns3::WifiMacQueueItem::IsQueued(), ns3::WifiMacQueueItem::QueueIteratorPair::it, NS_ASSERT, NS_LOG_DEBUG, and ns3::WifiMacQueueItem::QueueIteratorPair::queue.
Referenced by CtsTimeout(), and ForwardMpduDown().
|
protectedvirtual |
Destructor implementation.
This method is called by Dispose() or by the Object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.
It is safe to call GetObject() from within this method.
Reimplemented from ns3::Object.
Reimplemented in ns3::HtFrameExchangeManager, ns3::QosFrameExchangeManager, and ns3::WaveFrameExchangeManager.
Definition at line 86 of file frame-exchange-manager.cc.
References ns3::Object::DoDispose(), m_ackManager, m_channelAccessManager, m_fragmentedPacket, m_mac, m_phy, m_protectionManager, m_rxMiddle, m_txMiddle, ns3::MakeCallback(), NS_LOG_FUNCTION, Reset(), RxStartIndication(), and ns3::ObjectBase::TraceDisconnectWithoutContext().
Referenced by ns3::WaveFrameExchangeManager::DoDispose(), and ns3::QosFrameExchangeManager::DoDispose().
|
protected |
Send CTS after receiving RTS.
rtsHdr | the header of the received RTS |
ctsTxVector | the TXVECTOR to use to transmit the CTS |
rtsSnr | the SNR of the RTS in linear scale |
Definition at line 585 of file frame-exchange-manager.cc.
References ns3::Packet::AddPacketTag(), ns3::WifiPhy::CalculateTxDuration(), ForwardMpduDown(), ns3::WifiMacHeader::GetAddr2(), ns3::GetCtsSize(), ns3::WifiMacHeader::GetDuration(), ns3::WifiPhy::GetPhyBand(), ns3::WifiPhy::GetSifs(), ns3::Time::IsStrictlyNegative(), m_phy, NS_LOG_FUNCTION, ns3::Seconds(), ns3::SnrTag::Set(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::WifiMacHeader::SetDuration(), ns3::WifiMacHeader::SetNoMoreFragments(), ns3::WifiMacHeader::SetNoRetry(), ns3::WifiMacHeader::SetType(), and ns3::WIFI_MAC_CTL_CTS.
Referenced by SendCtsAfterRts().
|
protectedvirtual |
This method is called when the reception of an A-MPDU including multiple MPDUs is completed.
psdu | the received PSDU |
rxSnr | snr of MPDU received in linear scale |
txVector | TxVector of the received PSDU |
perMpduStatus | per MPDU reception status |
Reimplemented in ns3::HtFrameExchangeManager.
Definition at line 1107 of file frame-exchange-manager.cc.
References NS_ASSERT_MSG.
Referenced by Receive().
|
protectedvirtual |
Forward an MPDU down to the PHY layer.
mpdu | the MPDU to forward down |
txVector | the TXVECTOR used to transmit the MPDU |
Reimplemented in ns3::HtFrameExchangeManager.
Definition at line 419 of file frame-exchange-manager.cc.
References DequeueMpdu(), m_phy, NS_LOG_FUNCTION, and ns3::WifiPhy::Send().
Referenced by DoSendCtsAfterRts(), SendCtsToSelf(), SendMpdu(), SendNormalAck(), and SendRts().
Ptr< WifiAckManager > ns3::FrameExchangeManager::GetAckManager | ( | void | ) | const |
Get the Acknowledgment Manager used by this node.
Definition at line 127 of file frame-exchange-manager.cc.
References m_ackManager.
Referenced by ns3::HtFrameExchangeManager::SendAddBaRequest(), ns3::HtFrameExchangeManager::SendMpduFromBaManager(), ns3::QosFrameExchangeManager::TryAddMpdu(), and ns3::HtFrameExchangeManager::TryAggregateMsdu().
|
protectedvirtual |
Compute how to set the Duration/ID field of a CTS-to-self frame to send to protect a frame transmitted with the given TX vector.
ctsTxVector | the TX vector used to send the CTS-to-self frame |
txDuration | the TX duration of the data frame |
response | the time taken by the response (acknowledgment) to the data frame |
Reimplemented in ns3::QosFrameExchangeManager.
Definition at line 626 of file frame-exchange-manager.cc.
References ns3::WifiPhy::GetSifs(), m_phy, and NS_LOG_FUNCTION.
Referenced by ns3::QosFrameExchangeManager::GetCtsToSelfDurationId(), and SendCtsToSelf().
|
protected |
Fragment the given MPDU if needed.
If fragmentation is needed, return the first fragment; otherwise, return the given MPDU. Note that, if fragmentation is applied, the given MPDU is dequeued from the MAC queue and the first fragment is enqueued in its place.
mpdu | the given MPDU |
Definition at line 301 of file frame-exchange-manager.cc.
References ns3::Packet::Copy(), ns3::Packet::CreateFragment(), ns3::WifiMacQueue::Dequeue(), ns3::WifiMacQueueItem::GetHeader(), ns3::WifiMacQueueItem::GetPacket(), ns3::WifiMacQueueItem::GetQueueIteratorPairs(), ns3::WifiMacQueueItem::GetTimeStamp(), ns3::WifiMacQueueItem::IsFragment(), ns3::WifiMacQueueItem::QueueIteratorPair::it, m_fragmentedPacket, m_mac, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::WifiMacQueue::PushFront(), ns3::WifiMacQueueItem::QueueIteratorPair::queue, and ns3::WifiMacHeader::SetMoreFragments().
Referenced by ns3::QosFrameExchangeManager::StartFrameExchange(), and StartTransmission().
|
protectedvirtual |
Compute how to set the Duration/ID field of a frame being transmitted with the given TX parameters.
header | the MAC header of the frame |
size | the size of the frame in bytes |
txParams | the TX parameters used to send the frame |
fragmentedPacket | the packet that originated the frame to transmit, in case the latter is a fragment |
Reimplemented in ns3::QosFrameExchangeManager.
Definition at line 505 of file frame-exchange-manager.cc.
References ns3::WifiPhy::CalculateTxDuration(), ns3::GetAckSize(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetFragmentNumber(), ns3::WifiTxVector::GetMode(), ns3::WifiPhy::GetPhyBand(), ns3::WifiPhy::GetSifs(), ns3::Packet::GetSize(), ns3::WifiMacHeader::GetSize(), ns3::WifiMacHeader::IsMoreFragments(), ns3::WifiTxParameters::m_acknowledgment, m_mac, m_phy, ns3::WifiTxParameters::m_txVector, min, ns3::Time::Min(), NS_ASSERT, NS_LOG_FUNCTION, and ns3::WIFI_MAC_FCS_LENGTH.
Referenced by ns3::QosFrameExchangeManager::GetFrameDurationId(), and SendMpdu().
|
protected |
Get the next fragment of the current MSDU.
Only called for fragmented MSDUs.
Definition at line 696 of file frame-exchange-manager.cc.
References ns3::Packet::CreateFragment(), ns3::WifiMacQueueItem::GetHeader(), ns3::WifiMacQueueItem::GetPacketSize(), ns3::Packet::GetSize(), ns3::WifiMacHeader::IsMoreFragments(), m_fragmentedPacket, m_mpdu, NS_ASSERT, NS_LOG_FUNCTION, and ns3::WifiMacHeader::SetFragmentNumber().
Referenced by ReceivedNormalAck().
Ptr< WifiProtectionManager > ns3::FrameExchangeManager::GetProtectionManager | ( | void | ) | const |
Get the Protection Manager used by this node.
Definition at line 114 of file frame-exchange-manager.cc.
References m_protectionManager.
Referenced by ns3::QosFrameExchangeManager::StartFrameExchange(), ns3::QosFrameExchangeManager::TryAddMpdu(), and ns3::HtFrameExchangeManager::TryAggregateMsdu().
|
protectedvirtual |
Compute how to set the Duration/ID field of an RTS frame to send to protect a frame transmitted with the given TX vector.
rtsTxVector | the TX vector used to send the RTS frame |
txDuration | the TX duration of the data frame |
response | the time taken by the response (acknowledgment) to the data frame |
Reimplemented in ns3::QosFrameExchangeManager.
Definition at line 533 of file frame-exchange-manager.cc.
References ns3::WifiPhy::CalculateTxDuration(), ns3::GetCtsSize(), ns3::WifiTxVector::GetMode(), ns3::WifiPhy::GetPhyBand(), ns3::WifiPhy::GetSifs(), m_mac, m_phy, m_self, and NS_LOG_FUNCTION.
Referenced by ns3::QosFrameExchangeManager::GetRtsDurationId(), and SendRts().
|
protectedvirtual |
Get the updated TX duration of the frame associated with the given TX parameters if the size of the PSDU addressed to the given receiver becomes ppduPayloadSize.
ppduPayloadSize | the new PSDU size |
receiver | the MAC address of the receiver of the PSDU |
txParams | the TX parameters |
Definition at line 492 of file frame-exchange-manager.cc.
References ns3::WifiPhy::CalculateTxDuration(), ns3::WifiPhy::GetPhyBand(), m_phy, and ns3::WifiTxParameters::m_txVector.
Referenced by ns3::QosFrameExchangeManager::IsWithinTimeLimit(), and UpdateTxDuration().
|
static |
Get the type ID.
Definition at line 47 of file frame-exchange-manager.cc.
References ns3::TypeId::SetParent().
bool ns3::FrameExchangeManager::IsPromisc | ( | void | ) | const |
Check if the device is operating in promiscuous mode.
Definition at line 200 of file frame-exchange-manager.cc.
References m_promisc.
|
protectedvirtual |
Reset the NAV upon expiration of the NAV reset timer.
Definition at line 958 of file frame-exchange-manager.cc.
References m_channelAccessManager, m_navEnd, ns3::Simulator::Now(), and ns3::Seconds().
Referenced by ns3::QosFrameExchangeManager::ReceiveMpdu(), and UpdateNav().
|
protected |
Called when the Ack timeout expires.
mpdu | the MPDU that solicited a Normal Ack response |
Definition at line 751 of file frame-exchange-manager.cc.
References ns3::WifiMacQueueItem::GetHeader(), m_dcf, m_mac, m_mpdu, NotifyPacketDiscarded(), NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Txop::ResetCw(), RetransmitMpduAfterMissedAck(), ns3::WifiMacHeader::SetRetry(), TransmissionFailed(), and ns3::Txop::UpdateFailedCw().
Referenced by AmpduAggregationTest::DoRun(), and SendMpdu().
void ns3::FrameExchangeManager::NotifyOffNow | ( | void | ) |
This method is typically invoked by the PhyMacLowListener to notify the MAC layer that the device has been put into off mode.
When the device is put into off mode, pending MAC transmissions (RTS, CTS, Data and Ack) are cancelled.
Definition at line 843 of file frame-exchange-manager.cc.
References NS_LOG_DEBUG, and Reset().
|
protectedvirtual |
Pass the packet included in the given MPDU to the packet dropped callback.
mpdu | the discarded MPDU |
Reimplemented in ns3::HtFrameExchangeManager.
Definition at line 206 of file frame-exchange-manager.cc.
References m_mac.
Referenced by CtsTimeout(), ns3::HtFrameExchangeManager::MissedBlockAck(), NormalAckTimeout(), and ns3::HtFrameExchangeManager::NotifyPacketDiscarded().
|
protectedvirtual |
Notify other components that an MPDU was acknowledged.
mpdu | the MPDU that was acknowledged |
Reimplemented in ns3::HtFrameExchangeManager.
Definition at line 1098 of file frame-exchange-manager.cc.
References ns3::WifiMacQueueItem::GetHeader(), m_mac, and NS_LOG_FUNCTION.
Referenced by ns3::HtFrameExchangeManager::NotifyReceivedNormalAck(), and ReceivedNormalAck().
void ns3::FrameExchangeManager::NotifySleepNow | ( | void | ) |
This method is typically invoked by the PhyMacLowListener to notify the MAC layer that the device has been put into sleep mode.
When the device is put into sleep mode, pending MAC transmissions (RTS, CTS, Data and Ack) are cancelled.
Definition at line 836 of file frame-exchange-manager.cc.
References NS_LOG_DEBUG, and Reset().
void ns3::FrameExchangeManager::NotifySwitchingStartNow | ( | Time | duration | ) |
duration | switching delay duration. |
This method is typically invoked by the PhyMacLowListener to notify the MAC layer that a channel switching occurred. When a channel switching occurs, pending MAC transmissions (RTS, CTS, Data and Ack) are cancelled.
Definition at line 828 of file frame-exchange-manager.cc.
References m_mac, NS_LOG_DEBUG, and Reset().
|
protectedvirtual |
Perform actions that are possibly needed when receiving any frame, independently of whether the frame is addressed to this station (e.g., setting the NAV or the TXOP holder).
psdu | the received PSDU |
txVector | TX vector of the received PSDU |
Reimplemented in ns3::QosFrameExchangeManager.
Definition at line 894 of file frame-exchange-manager.cc.
References NS_LOG_FUNCTION, and UpdateNav().
Referenced by ns3::QosFrameExchangeManager::PreProcessFrame(), and Receive().
void ns3::FrameExchangeManager::Receive | ( | Ptr< WifiPsdu > | psdu, |
RxSignalInfo | rxSignalInfo, | ||
WifiTxVector | txVector, | ||
std::vector< bool > | perMpduStatus | ||
) |
This method is intended to be called by the PHY layer every time an MPDU is received and also when the reception of an A-MPDU is completed.
In case the PSDU contains multiple MPDUs, the perMpduStatus vector is empty when receiving the individual MPDUs.
psdu | the received PSDU |
rxSignalInfo | the info on the received signal ( |
txVector | TxVector of the received PSDU |
perMpduStatus | per MPDU reception status |
Definition at line 850 of file frame-exchange-manager.cc.
References EndReceiveAmpdu(), ns3::WifiTxVector::GetMode(), ns3::Mac48Address::IsGroup(), m_mac, m_promisc, m_rxMiddle, m_self, NS_ASSERT, NS_LOG_FUNCTION, PreProcessFrame(), ReceiveMpdu(), and ns3::RxSignalInfo::snr.
Referenced by SetWifiPhy().
|
protectedvirtual |
Perform the actions needed when a Normal Ack is received.
mpdu | the MPDU that was acknowledged |
txVector | the TXVECTOR used to transmit the MPDU that was acknowledged |
ackTxVector | the TXVECTOR used to transmit the Normal Ack frame |
rxSignalInfo | the info on the received signal ( |
snr | the SNR at the receiver for the MPDU that was acknowledged |
Definition at line 1063 of file frame-exchange-manager.cc.
References ns3::WifiTxTimer::Cancel(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacQueueItem::GetHeader(), ns3::WifiTxVector::GetMode(), GetNextFragment(), ns3::Txop::GetWifiMacQueue(), ns3::WifiMacHeader::IsMoreFragments(), m_channelAccessManager, m_dcf, m_mac, m_moreFragments, m_txTimer, NotifyReceivedNormalAck(), NS_LOG_DEBUG, ns3::Txop::ResetCw(), ns3::RxSignalInfo::snr, and TransmissionSucceeded().
Referenced by ReceiveMpdu().
|
protectedvirtual |
This method handles the reception of an MPDU (possibly included in an A-MPDU)
mpdu | the received MPDU |
rxSignalInfo | the info on the received signal ( |
txVector | TxVector of the received PSDU |
inAmpdu | true if the MPDU is part of an A-MPDU |
Reimplemented in ns3::HtFrameExchangeManager, and ns3::QosFrameExchangeManager.
Definition at line 965 of file frame-exchange-manager.cc.
References ns3::Packet::AddPacketTag(), ns3::WifiTxTimer::Cancel(), ns3::Packet::Copy(), ns3::SnrTag::Get(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacQueueItem::GetHeader(), ns3::WifiTxVector::GetMode(), ns3::WifiMacQueueItem::GetPacket(), ns3::WifiTxTimer::GetReason(), ns3::WifiPhy::GetSifs(), ns3::Mac48Address::IsGroup(), ns3::WifiTxTimer::IsRunning(), m_channelAccessManager, m_mac, m_mpdu, m_navEnd, m_phy, m_rxMiddle, m_self, m_txParams, m_txTimer, ns3::WifiTxParameters::m_txVector, ns3::Simulator::Now(), NS_ABORT_MSG_IF, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Packet::PeekPacketTag(), ReceivedNormalAck(), ns3::Simulator::Schedule(), SendCtsAfterRts(), SendMpdu(), SendNormalAck(), ns3::SnrTag::Set(), ns3::RxSignalInfo::snr, ns3::WifiTxTimer::WAIT_CTS, and ns3::WifiTxTimer::WAIT_NORMAL_ACK.
Referenced by Receive(), and ns3::QosFrameExchangeManager::ReceiveMpdu().
|
privatevirtual |
Reset this frame exchange manager.
Definition at line 71 of file frame-exchange-manager.cc.
References ns3::EventId::Cancel(), ns3::WifiTxTimer::Cancel(), ns3::WifiTxParameters::Clear(), ns3::EventId::IsRunning(), m_dcf, m_mpdu, m_navEnd, m_navResetEvent, m_txParams, m_txTimer, ns3::Simulator::Now(), and NS_LOG_FUNCTION.
Referenced by DoDispose(), NotifyOffNow(), NotifySleepNow(), and NotifySwitchingStartNow().
|
virtual |
Remove WifiPhy associated with this MacLow.
Definition at line 171 of file frame-exchange-manager.cc.
References m_phy, ns3::MakeCallback(), ns3::MakeNullCallback(), RxStartIndication(), ns3::WifiPhy::SetReceiveOkCallback(), and ns3::ObjectBase::TraceDisconnectWithoutContext().
|
protectedvirtual |
Retransmit an MPDU that was not acknowledged.
mpdu | the MPDU to retransmit |
Reimplemented in ns3::HtFrameExchangeManager.
Definition at line 778 of file frame-exchange-manager.cc.
References ns3::Txop::GetWifiMacQueue(), m_dcf, and NS_LOG_FUNCTION.
Referenced by NormalAckTimeout(), and ns3::HtFrameExchangeManager::RetransmitMpduAfterMissedAck().
|
protectedvirtual |
Retransmit an MPDU that was not sent because a CTS was not received.
mpdu | the MPDU to retransmit |
Reimplemented in ns3::HtFrameExchangeManager.
Definition at line 813 of file frame-exchange-manager.cc.
References ns3::WifiMacQueueItem::GetHeader(), ns3::WifiMacHeader::IsRetry(), m_txMiddle, and NS_LOG_FUNCTION.
Referenced by CtsTimeout(), and ns3::HtFrameExchangeManager::RetransmitMpduAfterMissedCts().
|
private |
txVector | the TXVECTOR decoded from PHY header. |
psduDuration | the duration of the PSDU that is about to be received. |
This method is typically invoked by the lower PHY layer to notify the MAC layer that the reception of a PSDU is starting. This is equivalent to the PHY-RXSTART primitive. If the reception is correct for at least one MPDU of the PSDU the Receive method will be called after psduDuration
.
Definition at line 212 of file frame-exchange-manager.cc.
References ns3::Time::As(), ns3::EventId::Cancel(), ns3::EventId::IsRunning(), ns3::WifiTxTimer::IsRunning(), ns3::Time::IsStrictlyPositive(), ns3::Time::IsZero(), m_channelAccessManager, m_navResetEvent, m_txTimer, ns3::NanoSeconds(), NS_ASSERT, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, PSDU_DURATION_SAFEGUARD, ns3::WifiTxTimer::Reschedule(), and ns3::Time::US.
Referenced by DoDispose(), ResetPhy(), and SetWifiPhy().
|
protected |
Send CTS after receiving RTS.
rtsHdr | the header of the received RTS |
rtsTxMode | the TX mode used to transmit the RTS |
rtsSnr | the SNR of the RTS in linear scale |
Definition at line 617 of file frame-exchange-manager.cc.
References DoSendCtsAfterRts(), ns3::WifiMacHeader::GetAddr2(), m_mac, and NS_LOG_FUNCTION.
Referenced by ns3::QosFrameExchangeManager::ReceiveMpdu(), and ReceiveMpdu().
|
protected |
Send CTS for a CTS-to-self mechanism.
txParams | the TX parameters for the data frame |
Definition at line 635 of file frame-exchange-manager.cc.
References ns3::WifiPhy::CalculateTxDuration(), ns3::WifiProtection::CTS_TO_SELF, ns3::WifiCtsToSelfProtection::ctsTxVector, ForwardMpduDown(), ns3::GetCtsSize(), GetCtsToSelfDurationId(), ns3::WifiPhy::GetPhyBand(), ns3::WifiPhy::GetSifs(), ns3::WifiTxParameters::m_acknowledgment, m_phy, ns3::WifiTxParameters::m_protection, m_self, ns3::WifiTxParameters::m_txDuration, ns3::Time::Min(), NS_ASSERT, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), SendMpdu(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::WifiMacHeader::SetDuration(), ns3::WifiMacHeader::SetNoMoreFragments(), ns3::WifiMacHeader::SetNoRetry(), ns3::WifiMacHeader::SetType(), and ns3::WIFI_MAC_CTL_CTS.
Referenced by SendMpduWithProtection(), and ns3::HtFrameExchangeManager::SendPsduWithProtection().
|
private |
Send the current MPDU, which can be acknowledged by a Normal Ack.
Definition at line 371 of file frame-exchange-manager.cc.
References ns3::WifiNormalAck::ackTxVector, ns3::WifiPhy::CalculatePhyPreambleAndHeaderDuration(), ns3::WifiPhy::CalculateTxDuration(), ForwardMpduDown(), GetFrameDurationId(), ns3::WifiMacQueueItem::GetHeader(), ns3::WifiPhy::GetPhyBand(), ns3::WifiPhy::GetSifs(), ns3::WifiMacQueueItem::GetSize(), ns3::WifiPhy::GetSlot(), ns3::WifiTxTimer::IsRunning(), ns3::WifiTxParameters::m_acknowledgment, m_channelAccessManager, m_fragmentedPacket, m_mpdu, m_phy, m_txParams, m_txTimer, ns3::WifiTxParameters::m_txVector, ns3::WifiAcknowledgment::NONE, ns3::WifiAcknowledgment::NORMAL_ACK, NormalAckTimeout(), NS_ABORT_MSG, NS_ASSERT, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), ns3::WifiTxTimer::Set(), ns3::WifiMacHeader::SetDuration(), timeout, TransmissionSucceeded(), and ns3::WifiTxTimer::WAIT_NORMAL_ACK.
Referenced by ReceiveMpdu(), SendCtsToSelf(), and SendMpduWithProtection().
|
protected |
Send an MPDU with the given TX parameters (with the specified protection).
Note that txParams is moved to m_txParams and hence is left in an undefined state.
mpdu | the MPDU to send |
txParams | the TX parameters to use to transmit the MPDU |
Definition at line 329 of file frame-exchange-manager.cc.
References CalculateAcknowledgmentTime(), ns3::WifiProtection::CTS_TO_SELF, ns3::WifiMacQueueItem::GetHeader(), ns3::WifiMacHeader::IsCtl(), ns3::WifiMacQueueItem::IsQueued(), ns3::WifiTxParameters::m_acknowledgment, m_mpdu, ns3::WifiTxParameters::m_protection, m_txParams, ns3::Time::Min(), ns3::WifiProtection::NONE, NS_ABORT_MSG, NS_ASSERT, NS_LOG_FUNCTION, ns3::WifiProtection::RTS_CTS, SendCtsToSelf(), SendMpdu(), SendRts(), and ns3::WifiAckManager::SetQosAckPolicy().
Referenced by ns3::HtFrameExchangeManager::SendAddBaRequest(), ns3::HtFrameExchangeManager::SendDataFrame(), ns3::QosFrameExchangeManager::StartFrameExchange(), ns3::WaveFrameExchangeManager::StartTransmission(), and StartTransmission().
|
protected |
Send Normal Ack.
hdr | the header of the frame soliciting the Normal Ack |
dataTxVector | the TXVECTOR used to transmit the frame soliciting the Normal Ack |
dataSnr | the SNR of the frame soliciting the Normal Ack in linear scale |
Definition at line 662 of file frame-exchange-manager.cc.
References ns3::Packet::AddPacketTag(), ns3::WifiPhy::CalculateTxDuration(), ForwardMpduDown(), ns3::GetAckSize(), ns3::WifiMacHeader::GetAddr2(), ns3::WifiMacHeader::GetDuration(), ns3::WifiTxVector::GetMode(), ns3::WifiPhy::GetPhyBand(), ns3::WifiPhy::GetSifs(), ns3::Time::IsStrictlyNegative(), m_mac, m_phy, NS_LOG_FUNCTION, ns3::Seconds(), ns3::SnrTag::Set(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::WifiMacHeader::SetDuration(), ns3::WifiMacHeader::SetNoMoreFragments(), ns3::WifiMacHeader::SetNoRetry(), ns3::WifiMacHeader::SetType(), and ns3::WIFI_MAC_CTL_ACK.
Referenced by ns3::QosFrameExchangeManager::ReceiveMpdu(), ns3::HtFrameExchangeManager::ReceiveMpdu(), and ReceiveMpdu().
|
protected |
Send RTS to begin RTS-CTS-Data-Ack transaction.
txParams | the TX parameters for the data frame |
Definition at line 546 of file frame-exchange-manager.cc.
References ns3::WifiPhy::CalculatePhyPreambleAndHeaderDuration(), ns3::WifiPhy::CalculateTxDuration(), CtsTimeout(), ns3::WifiRtsCtsProtection::ctsTxVector, ForwardMpduDown(), ns3::WifiPhy::GetPhyBand(), ns3::WifiTxParameters::GetPsduInfoMap(), GetRtsDurationId(), ns3::GetRtsSize(), ns3::WifiPhy::GetSifs(), ns3::WifiPhy::GetSlot(), ns3::WifiTxTimer::IsRunning(), ns3::WifiTxParameters::m_acknowledgment, m_channelAccessManager, m_phy, ns3::WifiTxParameters::m_protection, m_self, ns3::WifiTxParameters::m_txDuration, m_txTimer, ns3::Time::Min(), NS_ASSERT, NS_LOG_FUNCTION, ns3::WifiProtection::RTS_CTS, ns3::WifiRtsCtsProtection::rtsTxVector, ns3::WifiTxTimer::Set(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::WifiMacHeader::SetDuration(), ns3::WifiMacHeader::SetNoMoreFragments(), ns3::WifiMacHeader::SetNoRetry(), ns3::WifiMacHeader::SetType(), timeout, ns3::WifiTxTimer::WAIT_CTS, and ns3::WIFI_MAC_CTL_RTS.
Referenced by SendMpduWithProtection(), and ns3::HtFrameExchangeManager::SendPsduWithProtection().
|
virtual |
Set the Acknowledgment Manager to use.
ackManager | the Acknowledgment Manager to use |
Definition at line 120 of file frame-exchange-manager.cc.
References m_ackManager, and NS_LOG_FUNCTION.
Referenced by PowerRateAdaptationTest::ConfigureNode(), WifiTest::CreateOne(), InterferenceHelperSequenceTest::CreateOne(), AmpduAggregationTest::DoRun(), TwoLevelAggregationTest::DoRun(), DcfImmediateAccessBroadcastTestCase::DoRun(), Bug2831TestCase::DoRun(), and HeAggregationTest::DoRunSubTest().
|
virtual |
Set the MAC address.
address | the MAC address |
Definition at line 180 of file frame-exchange-manager.cc.
References first::address, m_self, and NS_LOG_FUNCTION.
|
virtual |
Set the Basic Service Set Identification.
bssid | the BSSID |
Definition at line 187 of file frame-exchange-manager.cc.
References m_bssid, and NS_LOG_FUNCTION.
|
virtual |
Set the channel access manager to use.
channelAccessManager | the channel access manager to use |
Definition at line 154 of file frame-exchange-manager.cc.
References m_channelAccessManager, and NS_LOG_FUNCTION.
|
virtual |
Set the MAC RX Middle to use.
rxMiddle | the MAC RX Middle to use |
Definition at line 147 of file frame-exchange-manager.cc.
References m_rxMiddle, and NS_LOG_FUNCTION.
|
virtual |
Set the MAC TX Middle to use.
txMiddle | the MAC TX Middle to use |
Definition at line 140 of file frame-exchange-manager.cc.
References m_txMiddle, and NS_LOG_FUNCTION.
void ns3::FrameExchangeManager::SetPromisc | ( | void | ) |
Enable promiscuous mode.
Definition at line 194 of file frame-exchange-manager.cc.
References m_promisc.
|
virtual |
Set the Protection Manager to use.
protectionManager | the Protection Manager to use |
Definition at line 107 of file frame-exchange-manager.cc.
References m_protectionManager, and NS_LOG_FUNCTION.
Referenced by PowerRateAdaptationTest::ConfigureNode(), WifiTest::CreateOne(), InterferenceHelperSequenceTest::CreateOne(), AmpduAggregationTest::DoRun(), TwoLevelAggregationTest::DoRun(), DcfImmediateAccessBroadcastTestCase::DoRun(), Bug2831TestCase::DoRun(), and HeAggregationTest::DoRunSubTest().
|
virtual |
Set the MAC layer to use.
mac | the MAC layer to use |
Reimplemented in ns3::HtFrameExchangeManager.
Definition at line 133 of file frame-exchange-manager.cc.
References m_mac, third::mac, and NS_LOG_FUNCTION.
Referenced by ns3::HtFrameExchangeManager::SetWifiMac().
Set the PHY layer to use.
phy | the PHY layer to use |
Definition at line 161 of file frame-exchange-manager.cc.
References m_phy, ns3::MakeCallback(), NS_LOG_FUNCTION, third::phy, Receive(), RxStartIndication(), ns3::WifiPhy::SetReceiveOkCallback(), and ns3::ObjectBase::TraceConnectWithoutContext().
Request the FrameExchangeManager to start a frame exchange sequence.
dcf | the channel access function that gained channel access. It is the DCF on non-QoS stations and an EDCA on QoS stations. |
Reimplemented in FrameExchangeManagerStub, ns3::WaveFrameExchangeManager, and ns3::QosFrameExchangeManager.
Definition at line 243 of file frame-exchange-manager.cc.
References ns3::WifiTxParameters::AddMpdu(), ns3::WifiTxTimer::Cancel(), ns3::WifiMacHeader::GetAddr1(), GetFirstFragmentIfNeeded(), ns3::WifiMacQueueItem::GetHeader(), ns3::WifiMacQueueItem::GetPacketSize(), ns3::WifiMacHeader::GetSequenceControl(), ns3::Txop::GetWifiMacQueue(), ns3::WifiMacHeader::IsData(), ns3::WifiMacQueueItem::IsFragment(), ns3::WifiMacHeader::IsMgt(), ns3::WifiMacHeader::IsRetry(), ns3::WifiTxTimer::IsRunning(), m_ackManager, ns3::WifiTxParameters::m_acknowledgment, m_dcf, m_mac, m_mpdu, ns3::WifiTxParameters::m_protection, m_protectionManager, m_txMiddle, m_txTimer, ns3::WifiTxParameters::m_txVector, ns3::Txop::NotifyChannelAccessed(), ns3::Txop::NotifyChannelReleased(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, SendMpduWithProtection(), ns3::WifiMacHeader::SetSequenceNumber(), and UpdateTxDuration().
Referenced by ns3::QosFrameExchangeManager::StartTransmission(), ns3::WaveFrameExchangeManager::StartTransmission(), and TransmissionSucceeded().
|
protectedvirtual |
Take necessary actions upon a transmission failure.
A non-QoS station releases the channel when this method is called.
Reimplemented in ns3::QosFrameExchangeManager.
Definition at line 742 of file frame-exchange-manager.cc.
References m_dcf, ns3::Txop::NotifyChannelReleased(), and NS_LOG_FUNCTION.
Referenced by CtsTimeout(), NormalAckTimeout(), and ns3::QosFrameExchangeManager::TransmissionFailed().
|
protectedvirtual |
Take necessary actions upon a transmission success.
A non-QoS station transmits the next fragment, if any, or releases the channel, otherwise.
Reimplemented in ns3::HtFrameExchangeManager, and ns3::QosFrameExchangeManager.
Definition at line 722 of file frame-exchange-manager.cc.
References ns3::WifiPhy::GetSifs(), m_dcf, m_moreFragments, m_phy, ns3::Txop::NotifyChannelReleased(), NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), and StartTransmission().
Referenced by ReceivedNormalAck(), SendMpdu(), and ns3::QosFrameExchangeManager::TransmissionSucceeded().
|
protectedvirtual |
Update the NAV, if needed, based on the Duration/ID of the given psdu.
psdu | the received PSDU |
txVector | TxVector of the received PSDU |
Definition at line 902 of file frame-exchange-manager.cc.
References ns3::WifiPhy::CalculatePhyPreambleAndHeaderDuration(), ns3::WifiPhy::CalculateTxDuration(), ns3::WifiPsdu::GetAddr1(), ns3::GetCtsSize(), ns3::WifiPsdu::GetDuration(), ns3::WifiPsdu::GetHeader(), ns3::WifiPhy::GetPhyBand(), ns3::WifiMacHeader::GetRawDuration(), ns3::WifiPhy::GetSifs(), ns3::WifiPhy::GetSlot(), ns3::WifiMacHeader::IsRts(), m_channelAccessManager, m_navEnd, m_navResetEvent, m_phy, m_self, NavResetTimeout(), ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::Simulator::Schedule().
Referenced by PreProcessFrame().
|
protected |
Update the TX duration field of the given TX parameters after that the PSDU addressed to the given receiver has changed.
receiver | the MAC address of the receiver of the PSDU |
txParams | the TX parameters |
Definition at line 499 of file frame-exchange-manager.cc.
References ns3::WifiTxParameters::GetSize(), GetTxDuration(), and ns3::WifiTxParameters::m_txDuration.
Referenced by StartTransmission(), ns3::QosFrameExchangeManager::TryAddMpdu(), and ns3::HtFrameExchangeManager::TryAggregateMsdu().
|
private |
Acknowledgment manager.
Definition at line 510 of file frame-exchange-manager.h.
Referenced by DoDispose(), GetAckManager(), SetAckManager(), and StartTransmission().
|
private |
TypeId of the acknowledgment manager to install.
Definition at line 509 of file frame-exchange-manager.h.
|
protected |
BSSID address (Mac48Address)
Definition at line 350 of file frame-exchange-manager.h.
Referenced by ns3::HtFrameExchangeManager::SendAddBaRequest(), ns3::HtFrameExchangeManager::SendDelbaFrame(), and SetBssid().
|
protected |
the channel access manager
Definition at line 347 of file frame-exchange-manager.h.
Referenced by DoDispose(), NavResetTimeout(), ns3::QosFrameExchangeManager::PifsRecovery(), ReceivedNormalAck(), ns3::HtFrameExchangeManager::ReceiveMpdu(), ReceiveMpdu(), RxStartIndication(), SendMpdu(), ns3::HtFrameExchangeManager::SendPsdu(), SendRts(), SetChannelAccessManager(), and UpdateNav().
the DCF/EDCAF that gained channel access
Definition at line 341 of file frame-exchange-manager.h.
Referenced by CtsTimeout(), AmpduAggregationTest::DoRun(), NormalAckTimeout(), ReceivedNormalAck(), Reset(), RetransmitMpduAfterMissedAck(), ns3::WaveFrameExchangeManager::StartTransmission(), StartTransmission(), ns3::QosFrameExchangeManager::StartTransmission(), TransmissionFailed(), and TransmissionSucceeded().
the MSDU being fragmented
Definition at line 505 of file frame-exchange-manager.h.
Referenced by DoDispose(), GetFirstFragmentIfNeeded(), GetNextFragment(), and SendMpdu().
|
protected |
the MAC layer on this station
Definition at line 344 of file frame-exchange-manager.h.
Referenced by ns3::HtFrameExchangeManager::BlockAckTimeout(), ns3::HtFrameExchangeManager::CreateBlockAckAgreement(), ns3::HtFrameExchangeManager::CtsTimeout(), CtsTimeout(), DoDispose(), ns3::HtFrameExchangeManager::EndReceiveAmpdu(), ns3::HtFrameExchangeManager::GetBaManager(), ns3::WaveFrameExchangeManager::GetDataTxVector(), GetFirstFragmentIfNeeded(), GetFrameDurationId(), GetRtsDurationId(), ns3::HtFrameExchangeManager::MissedBlockAck(), ns3::HtFrameExchangeManager::NeedSetupBlockAck(), NormalAckTimeout(), ns3::HtFrameExchangeManager::NotifyPacketDiscarded(), NotifyPacketDiscarded(), ns3::HtFrameExchangeManager::NotifyReceivedNormalAck(), NotifyReceivedNormalAck(), NotifySwitchingStartNow(), ns3::HtFrameExchangeManager::NotifyTxToEdca(), ns3::QosFrameExchangeManager::PreProcessFrame(), Receive(), ReceivedNormalAck(), ns3::HtFrameExchangeManager::ReceiveMpdu(), ReceiveMpdu(), ns3::HtFrameExchangeManager::RetransmitMpduAfterMissedAck(), ns3::HtFrameExchangeManager::RetransmitMpduAfterMissedCts(), ns3::HtFrameExchangeManager::SendAddBaRequest(), ns3::QosFrameExchangeManager::SendCfEndIfNeeded(), SendCtsAfterRts(), ns3::HtFrameExchangeManager::SendDataFrame(), ns3::HtFrameExchangeManager::SendDelbaFrame(), ns3::HtFrameExchangeManager::SendMpduFromBaManager(), SendNormalAck(), ns3::HtFrameExchangeManager::SendPsdu(), SetWifiMac(), ns3::HtFrameExchangeManager::StartFrameExchange(), ns3::QosFrameExchangeManager::StartFrameExchange(), and StartTransmission().
|
private |
true if a fragment has to be sent after a SIFS
Definition at line 506 of file frame-exchange-manager.h.
Referenced by ReceivedNormalAck(), and TransmissionSucceeded().
|
private |
the MPDU being transmitted
Definition at line 503 of file frame-exchange-manager.h.
Referenced by CtsTimeout(), GetNextFragment(), NormalAckTimeout(), ReceiveMpdu(), Reset(), SendMpdu(), SendMpduWithProtection(), and StartTransmission().
|
protected |
NAV expiration time.
Definition at line 351 of file frame-exchange-manager.h.
Referenced by NavResetTimeout(), ns3::QosFrameExchangeManager::ReceiveMpdu(), ReceiveMpdu(), Reset(), and UpdateNav().
|
protected |
the event to reset the NAV after an RTS
Definition at line 343 of file frame-exchange-manager.h.
Referenced by Reset(), RxStartIndication(), and UpdateNav().
the PHY layer on this station
Definition at line 348 of file frame-exchange-manager.h.
Referenced by ns3::HtFrameExchangeManager::CalculateAcknowledgmentTime(), CalculateAcknowledgmentTime(), CalculateProtectionTime(), DoDispose(), DoSendCtsAfterRts(), ns3::HtFrameExchangeManager::EndReceiveAmpdu(), ForwardMpduDown(), ns3::HtFrameExchangeManager::ForwardPsduDown(), ns3::QosFrameExchangeManager::GetCtsToSelfDurationId(), GetCtsToSelfDurationId(), ns3::QosFrameExchangeManager::GetFrameDurationId(), GetFrameDurationId(), ns3::QosFrameExchangeManager::GetRtsDurationId(), GetRtsDurationId(), GetTxDuration(), ns3::QosFrameExchangeManager::PifsRecovery(), ns3::QosFrameExchangeManager::ReceiveMpdu(), ns3::HtFrameExchangeManager::ReceiveMpdu(), ReceiveMpdu(), ResetPhy(), ns3::HtFrameExchangeManager::SendBlockAck(), ns3::QosFrameExchangeManager::SendCfEndIfNeeded(), SendCtsToSelf(), SendMpdu(), ns3::HtFrameExchangeManager::SendMpduFromBaManager(), SendNormalAck(), ns3::HtFrameExchangeManager::SendPsdu(), SendRts(), SetWifiPhy(), ns3::WaveFrameExchangeManager::StartTransmission(), ns3::QosFrameExchangeManager::TransmissionFailed(), ns3::QosFrameExchangeManager::TransmissionSucceeded(), ns3::HtFrameExchangeManager::TransmissionSucceeded(), TransmissionSucceeded(), and UpdateNav().
|
protected |
Flag if the device is operating in promiscuous mode.
Definition at line 352 of file frame-exchange-manager.h.
Referenced by IsPromisc(), Receive(), and SetPromisc().
|
private |
Protection manager.
Definition at line 508 of file frame-exchange-manager.h.
Referenced by DoDispose(), GetProtectionManager(), SetProtectionManager(), and StartTransmission().
|
private |
TypeId of the protection manager to install.
Definition at line 507 of file frame-exchange-manager.h.
|
protected |
the MAC RX Middle on this station
Definition at line 346 of file frame-exchange-manager.h.
Referenced by ns3::HtFrameExchangeManager::CreateBlockAckAgreement(), DoDispose(), Receive(), ns3::QosFrameExchangeManager::ReceiveMpdu(), ReceiveMpdu(), and SetMacRxMiddle().
|
protected |
the MAC address of this device
Definition at line 349 of file frame-exchange-manager.h.
Referenced by GetRtsDurationId(), ns3::QosFrameExchangeManager::PreProcessFrame(), Receive(), ns3::QosFrameExchangeManager::ReceiveMpdu(), ns3::HtFrameExchangeManager::ReceiveMpdu(), ReceiveMpdu(), ns3::HtFrameExchangeManager::SendAddBaRequest(), ns3::HtFrameExchangeManager::SendBlockAck(), ns3::QosFrameExchangeManager::SendCfEndIfNeeded(), SendCtsToSelf(), ns3::HtFrameExchangeManager::SendDelbaFrame(), SendRts(), SetAddress(), and UpdateNav().
|
protected |
the MAC TX Middle on this station
Definition at line 345 of file frame-exchange-manager.h.
Referenced by DoDispose(), ns3::HtFrameExchangeManager::RetransmitMpduAfterMissedCts(), RetransmitMpduAfterMissedCts(), ns3::HtFrameExchangeManager::SendAddBaRequest(), SetMacTxMiddle(), ns3::WaveFrameExchangeManager::StartTransmission(), and StartTransmission().
|
private |
the TX parameters for the current frame
Definition at line 504 of file frame-exchange-manager.h.
Referenced by ReceiveMpdu(), Reset(), SendMpdu(), and SendMpduWithProtection().
|
protected |
the timer set upon frame transmission
Definition at line 342 of file frame-exchange-manager.h.
Referenced by ReceivedNormalAck(), ns3::HtFrameExchangeManager::ReceiveMpdu(), ReceiveMpdu(), Reset(), RxStartIndication(), SendMpdu(), ns3::HtFrameExchangeManager::SendPsdu(), SendRts(), ns3::WaveFrameExchangeManager::StartTransmission(), StartTransmission(), and ns3::QosFrameExchangeManager::StartTransmission().