Frame Exchange Manager Stub. More...
Public Member Functions | |
FrameExchangeManagerStub (ChannelAccessManagerTest< TxopType > *test) | |
Constructor. | |
void | NotifyInternalCollision (Ptr< Txop > txop) override |
Notify that an internal collision has occurred for the given Txop. | |
void | NotifySwitchingStartNow (Time duration) override |
bool | StartTransmission (Ptr< Txop > dcf, MHz_u allowedWidth) override |
Request the FrameExchangeManager to start a frame exchange sequence. | |
Public Member Functions inherited from ns3::FrameExchangeManager | |
FrameExchangeManager () | |
~FrameExchangeManager () override | |
virtual void | CalculateAcknowledgmentTime (WifiAcknowledgment *acknowledgment) const |
Calculate the time required to acknowledge a frame according to the given acknowledgment method. | |
virtual void | CalculateProtectionTime (WifiProtection *protection) const |
Calculate the time required to protect a frame according to the given protection method. | |
Ptr< WifiAckManager > | GetAckManager () const |
Get the Acknowledgment Manager used by this node. | |
Mac48Address | GetAddress () const |
Get the MAC address. | |
MHz_u | GetAllowedWidth () const |
Mac48Address | GetBssid () const |
Get the Basic Service Set Identification. | |
std::optional< std::reference_wrapper< const OngoingRxInfo > > | GetOngoingRxInfo () const |
const std::set< Mac48Address > & | GetProtectedStas () const |
Ptr< WifiProtectionManager > | GetProtectionManager () const |
Get the Protection Manager used by this node. | |
std::optional< std::reference_wrapper< const WifiMacHeader > > | GetReceivedMacHdr () const |
const WifiTxTimer & | GetWifiTxTimer () const |
Get a const reference to the WifiTxTimer object. | |
bool | IsPromisc () const |
Check if the device is operating in promiscuous mode. | |
void | NotifyOffNow () |
This method is typically invoked by the PhyListener to notify the MAC layer that the device has been put into off mode. | |
void | NotifySleepNow () |
This method is typically invoked by the PhyListener to notify the MAC layer that the device has been put into sleep mode. | |
void | Receive (Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, const 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. | |
virtual void | ResetPhy () |
Remove WifiPhy associated with this FrameExchangeManager. | |
void | SetAckedMpduCallback (AckedMpdu callback) |
Set the callback to invoke when an MPDU is successfully acked. | |
virtual void | SetAckManager (Ptr< WifiAckManager > ackManager) |
Set the Acknowledgment Manager to use. | |
virtual void | SetAddress (Mac48Address address) |
Set the MAC address. | |
virtual void | SetBssid (Mac48Address bssid) |
Set the Basic Service Set Identification. | |
virtual void | SetChannelAccessManager (const Ptr< ChannelAccessManager > channelAccessManager) |
Set the channel access manager to use. | |
virtual void | SetDroppedMpduCallback (DroppedMpdu callback) |
Set the callback to invoke when an MPDU is dropped. | |
virtual void | SetLinkId (uint8_t linkId) |
Set the ID of the link this Frame Exchange Manager is associated with. | |
virtual void | SetMacRxMiddle (const Ptr< MacRxMiddle > rxMiddle) |
Set the MAC RX Middle to use. | |
virtual void | SetMacTxMiddle (const Ptr< MacTxMiddle > txMiddle) |
Set the MAC TX Middle to use. | |
void | SetPromisc () |
Enable promiscuous mode. | |
virtual void | SetProtectionManager (Ptr< WifiProtectionManager > protectionManager) |
Set the Protection Manager to use. | |
virtual void | SetWifiMac (const Ptr< WifiMac > mac) |
Set the MAC layer to use. | |
virtual void | SetWifiPhy (const Ptr< WifiPhy > phy) |
Set the PHY layer to use. | |
virtual bool | VirtualCsMediumIdle () const |
Public Member Functions inherited from ns3::Object | |
Object () | |
Constructor. | |
~Object () override | |
Destructor. | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. | |
void | Dispose () |
Dispose of this Object. | |
AggregateIterator | GetAggregateIterator () const |
Get an iterator to the Objects aggregated to this one. | |
TypeId | GetInstanceTypeId () const override |
Get the most derived TypeId for this Object. | |
template<typename T > | |
Ptr< T > | GetObject () const |
Get a pointer to the requested aggregated Object. | |
template<> | |
Ptr< Object > | GetObject () const |
Specialization of () for objects of type ns3::Object. | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. | |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
Specialization of (TypeId tid) for objects of type ns3::Object. | |
void | Initialize () |
Invoke DoInitialize on all Objects aggregated to this one. | |
bool | IsInitialized () const |
Check if the object has been initialized. | |
void | UnidirectionalAggregateObject (Ptr< Object > other) |
Aggregate an Object to another Object. | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Default constructor. | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. | |
void | Ref () const |
Increment the reference count. | |
void | Unref () const |
Decrement the reference count. | |
Public Member Functions inherited from ns3::ObjectBase | |
virtual | ~ObjectBase () |
Virtual destructor. | |
void | GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const |
Get the value of an attribute, raising fatal errors if unsuccessful. | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising errors. | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. | |
Private Attributes | |
ChannelAccessManagerTest< TxopType > * | m_test |
the test DCF/EDCA manager | |
Additional Inherited Members | |
Public Types inherited from ns3::FrameExchangeManager | |
typedef Callback< void, Ptr< const WifiMpdu > > | AckedMpdu |
typedef for a callback to invoke when an MPDU is successfully acknowledged. | |
typedef Callback< void, WifiMacDropReason, Ptr< const WifiMpdu > > | DroppedMpdu |
typedef for a callback to invoke when an MPDU is dropped. | |
Static Public Member Functions inherited from ns3::FrameExchangeManager | |
static TypeId | GetTypeId () |
Get the type ID. | |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId () |
Register this type. | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId () |
Get the type ID. | |
Protected Member Functions inherited from ns3::FrameExchangeManager | |
virtual void | CtsTimeout (Ptr< WifiMpdu > rts, const WifiTxVector &txVector) |
Called when the CTS timeout expires. | |
virtual void | DequeueMpdu (Ptr< const WifiMpdu > mpdu) |
Dequeue the given MPDU from the queue in which it is stored. | |
void | DoCtsTimeout (Ptr< WifiPsdu > psdu) |
Take required actions when the CTS timer fired after sending an RTS to protect the given PSDU expires. | |
void | DoDispose () override |
Destructor implementation. | |
void | DoSendCtsAfterRts (const WifiMacHeader &rtsHdr, WifiTxVector &ctsTxVector, double rtsSnr) |
Send CTS after receiving RTS. | |
Ptr< WifiMpdu > | DropMpduIfRetryLimitReached (Ptr< WifiPsdu > psdu) |
Wrapper for the GetMpdusToDropOnTxFailure function of the remote station manager that additionally drops the MPDUs in the given PSDU that the remote station manager requested to drop. | |
virtual void | EndReceiveAmpdu (Ptr< const WifiPsdu > psdu, const RxSignalInfo &rxSignalInfo, const WifiTxVector &txVector, const std::vector< bool > &perMpduStatus) |
This method is called when the reception of an A-MPDU including multiple MPDUs is completed. | |
virtual void | FinalizeMacHeader (Ptr< const WifiPsdu > psdu) |
Finalize the MAC header of the MPDUs in the given PSDU before transmission. | |
virtual void | ForwardMpduDown (Ptr< WifiMpdu > mpdu, WifiTxVector &txVector) |
Forward an MPDU down to the PHY layer. | |
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. | |
Ptr< WifiMpdu > | GetFirstFragmentIfNeeded (Ptr< WifiMpdu > mpdu) |
Fragment the given MPDU if needed. | |
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. | |
Ptr< WifiMpdu > | GetNextFragment () |
Get the next fragment of the current MSDU. | |
virtual uint32_t | GetPsduSize (Ptr< const WifiMpdu > mpdu, const WifiTxVector &txVector) const |
Get the size in bytes of the given MPDU, which is to be transmitted with the given TXVECTOR. | |
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. | |
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. | |
Ptr< WifiRemoteStationManager > | GetWifiRemoteStationManager () const |
virtual void | NavResetTimeout () |
Reset the NAV upon expiration of the NAV reset timer. | |
virtual void | NormalAckTimeout (Ptr< WifiMpdu > mpdu, const WifiTxVector &txVector) |
Called when the Ack timeout expires. | |
virtual void | NotifyChannelReleased (Ptr< Txop > txop) |
Notify the given Txop that channel has been released. | |
virtual void | NotifyPacketDiscarded (Ptr< const WifiMpdu > mpdu) |
Pass the given MPDU, discarded because of the max retry limit was reached, to the MPDU dropped callback. | |
virtual void | NotifyReceivedNormalAck (Ptr< WifiMpdu > mpdu) |
Notify other components that an MPDU was acknowledged. | |
virtual void | PostProcessFrame (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector) |
Perform actions that are possibly needed after receiving any frame, independently of whether the frame is addressed to this station (e.g., setting the NAV or the TXOP holder). | |
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., storing buffer status reports). | |
virtual void | ProtectionCompleted () |
Transmit prepared frame immediately, if no protection was used, or in a SIFS, if protection was completed successfully. | |
virtual void | PsduRxError (Ptr< const WifiPsdu > psdu) |
This method is called when the reception of a PSDU fails. | |
virtual void | ReceivedMacHdr (const WifiMacHeader &macHdr, const WifiTxVector &txVector, Time psduDuration) |
Store information about the MAC header of the MPDU being received. | |
virtual void | ReceivedNormalAck (Ptr< WifiMpdu > mpdu, const WifiTxVector &txVector, const WifiTxVector &ackTxVector, const RxSignalInfo &rxInfo, double snr) |
Perform the actions needed when a Normal Ack is received. | |
virtual void | ReceiveMpdu (Ptr< const WifiMpdu > mpdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, bool inAmpdu) |
This method handles the reception of an MPDU (possibly included in an A-MPDU) | |
virtual void | ReleaseSequenceNumbers (Ptr< const WifiPsdu > psdu) const |
Make the sequence numbers of MPDUs included in the given PSDU available again if the MPDUs have never been transmitted. | |
virtual void | Reset () |
Reset this frame exchange manager. | |
virtual void | RetransmitMpduAfterMissedAck (Ptr< WifiMpdu > mpdu) const |
Retransmit an MPDU that was not acknowledged. | |
virtual void | RxStartIndication (WifiTxVector txVector, Time psduDuration) |
virtual void | SendCtsAfterRts (const WifiMacHeader &rtsHdr, WifiMode rtsTxMode, double rtsSnr) |
Send CTS after receiving RTS. | |
void | SendCtsToSelf (const WifiTxParameters &txParams) |
Send CTS for a CTS-to-self mechanism. | |
void | SendMpduWithProtection (Ptr< WifiMpdu > mpdu, WifiTxParameters &txParams) |
Send an MPDU with the given TX parameters (with the specified protection). | |
void | SendNormalAck (const WifiMacHeader &hdr, const WifiTxVector &dataTxVector, double dataSnr) |
Send Normal Ack. | |
void | SendRts (const WifiTxParameters &txParams) |
Send RTS to begin RTS-CTS-Data-Ack transaction. | |
virtual void | StartProtection (const WifiTxParameters &txParams) |
Start the protection mechanism indicated by the given TX parameters. | |
virtual void | TransmissionFailed (bool forceCurrentCw=false) |
Take necessary actions upon a transmission failure. | |
virtual void | TransmissionSucceeded () |
Take necessary actions upon a transmission success. | |
virtual void | UpdateNav (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector) |
Update the NAV, if needed, based on the Duration/ID of the given psdu. | |
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. | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
Copy an Object. | |
virtual void | DoInitialize () |
Initialize() implementation. | |
virtual void | NotifyNewAggregate () |
Notify all Objects aggregated to this one of a new Object being aggregated. | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. | |
virtual void | NotifyConstructionCompleted () |
Notifier called once the ObjectBase is fully constructed. | |
Protected Attributes inherited from ns3::FrameExchangeManager | |
AckedMpdu | m_ackedMpduCallback |
the acknowledged MPDU callback | |
MHz_u | m_allowedWidth |
the allowed width for the current transmission | |
Ptr< ApWifiMac > | m_apMac |
AP MAC layer pointer (null if not an AP) | |
Mac48Address | m_bssid |
BSSID address (Mac48Address) | |
Ptr< ChannelAccessManager > | m_channelAccessManager |
the channel access manager | |
Ptr< Txop > | m_dcf |
the DCF/EDCAF that gained channel access | |
DroppedMpdu | m_droppedMpduCallback |
the dropped MPDU callback | |
uint8_t | m_linkId |
the ID of the link this object is associated with | |
Ptr< WifiMac > | m_mac |
the MAC layer on this station | |
Time | m_navEnd |
NAV expiration time. | |
EventId | m_navResetEvent |
the event to reset the NAV after an RTS | |
Ptr< WifiPhy > | m_phy |
the PHY layer on this station | |
bool | m_promisc |
Flag if the device is operating in promiscuous mode. | |
bool | m_protectedIfResponded |
whether a STA is assumed to be protected if replied to a frame requiring acknowledgment | |
std::set< Mac48Address > | m_protectedStas |
STAs that have replied to an RTS in this TXOP. | |
Ptr< MacRxMiddle > | m_rxMiddle |
the MAC RX Middle on this station | |
Mac48Address | m_self |
the MAC address of this device | |
std::set< Mac48Address > | m_sentFrameTo |
the STA(s) to which we sent a frame requesting a response | |
std::set< Mac48Address > | m_sentRtsTo |
the STA(s) which we sent an RTS to (waiting for CTS) | |
Ptr< StaWifiMac > | m_staMac |
STA MAC layer pointer (null if not a STA) | |
Ptr< MacTxMiddle > | m_txMiddle |
the MAC TX Middle on this station | |
Time | m_txNav |
the TXNAV timer | |
WifiTxTimer | m_txTimer |
the timer set upon frame transmission | |
Related Symbols inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
Frame Exchange Manager Stub.
Definition at line 182 of file channel-access-manager-test.cc.
|
inline |
Constructor.
test | the test channel access manager |
Definition at line 190 of file channel-access-manager-test.cc.
|
inlineoverridevirtual |
Notify that an internal collision has occurred for the given Txop.
txop | the Txop for which an internal collision has occurred |
Reimplemented from ns3::FrameExchangeManager.
Definition at line 210 of file channel-access-manager-test.cc.
References ns3::DynamicCast(), and FrameExchangeManagerStub< TxopType >::m_test.
|
inlineoverridevirtual |
duration | switching delay duration. |
This method is typically invoked by the PhyListener 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.
Reimplemented from ns3::FrameExchangeManager.
Definition at line 216 of file channel-access-manager-test.cc.
References FrameExchangeManagerStub< TxopType >::m_test.
|
inlineoverridevirtual |
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. |
allowedWidth | the maximum allowed TX width |
Reimplemented from ns3::FrameExchangeManager.
Definition at line 203 of file channel-access-manager-test.cc.
|
private |
the test DCF/EDCA manager
Definition at line 222 of file channel-access-manager-test.cc.
Referenced by FrameExchangeManagerStub< TxopType >::NotifyInternalCollision(), and FrameExchangeManagerStub< TxopType >::NotifySwitchingStartNow().