|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
21 #ifndef WIFI_TX_TIMER_H
22 #define WIFI_TX_TIMER_H
24 #include "ns3/event-id.h"
25 #include "ns3/nstime.h"
26 #include "ns3/simulator.h"
27 #include "ns3/traced-callback.h"
29 #include <unordered_map>
33 class WifiMacQueueItem;
38 typedef std::unordered_map <uint16_t , Ptr<WifiPsdu> >
WifiPsduMap;
86 template<
typename MEM,
typename OBJ,
typename... Args>
87 void Set (
Reason reason,
const Time &delay, MEM mem_ptr, OBJ obj, Args... args);
185 template<
typename MEM,
typename OBJ,
typename... Args>
186 void Timeout (MEM mem_ptr, OBJ obj, Args... args);
215 std::size_t nTotalStations);
239 template<
typename MEM,
typename OBJ,
typename... Args>
243 typedef void (
WifiTxTimer::*TimeoutType)(MEM, OBJ, Args...);
251 std::forward<Args> (args)... ),
false);
254 template<
typename MEM,
typename OBJ,
typename... Args>
261 ((*obj).*mem_ptr)(std::forward<Args> (args)...);
std::string GetReasonString(Reason reason) const
Get a string associated with the given reason.
std::unordered_map< uint16_t, Ptr< WifiPsdu > > WifiPsduMap
Map of PSDUs indexed by STA-ID.
An identifier for simulation events.
Ptr< EventImpl > m_endRxEvent
event to schedule upon RXSTART.indication
Callback< void, uint8_t, Ptr< const WifiPsdu >, const WifiTxVector & > PsduResponseTimeout
PSDU response timeout callback typedef.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Time GetDelayLeft(void) const
Get the remaining time until the timer will expire.
PsduResponseTimeout m_psduResponseTimeoutCallback
the PSDU response timeout callback
@ WAIT_TB_PPDU_AFTER_BASIC_TF
void SetPsduResponseTimeoutCallback(PsduResponseTimeout callback) const
Set the callback to invoke when the TX timer following the transmission of a PSDU expires.
bool IsRunning(void) const
Return true if the timer is running.
@ WAIT_QOS_NULL_AFTER_BSRP_TF
Callback< void, uint8_t, Ptr< const WifiMacQueueItem >, const WifiTxVector & > MpduResponseTimeout
MPDU response timeout callback typedef.
void FeedTraceSource(Ptr< WifiMacQueueItem > item, WifiTxVector txVector)
This method is called when the timer expires to feed the MPDU response timeout callback.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
MpduResponseTimeout m_mpduResponseTimeoutCallback
the MPDU response timeout callback
void SetPsduMapResponseTimeoutCallback(PsduMapResponseTimeout callback) const
Set the callback to invoke when the TX timer following the transmission of a PSDU map expires.
void SetMpduResponseTimeoutCallback(MpduResponseTimeout callback) const
Set the callback to invoke when the TX timer following the transmission of an MPDU expires.
@ WAIT_BLOCK_ACK_AFTER_TB_PPDU
Callback< void, uint8_t, WifiPsduMap *, const std::set< Mac48Address > *, std::size_t > PsduMapResponseTimeout
PSDU map response timeout callback typedef.
void Reschedule(const Time &delay)
Reschedule the timer to time out the given amount of time from the moment this function is called.
@ WAIT_NORMAL_ACK_AFTER_DL_MU_PPDU
Simulation virtual time values and global simulation resolution.
Reason
The reason why the timer was started.
EventId m_timeoutEvent
the timeout event after a missing response
bool m_rescheduled
whether the timer has been already rescheduled
WifiTxTimer()
Default constructor.
void Timeout(MEM mem_ptr, OBJ obj, Args... args)
This method is called when the timer expires.
PsduMapResponseTimeout m_psduMapResponseTimeoutCallback
the PSDU map response timeout callback
Reason GetReason(void) const
Get the reason why the timer was started.
@ WAIT_BLOCK_ACKS_IN_TB_PPDU
Reason m_reason
the reason why the timer was started
void Set(Reason reason, const Time &delay, MEM mem_ptr, OBJ obj, Args... args)
This method is called when a frame soliciting a response is transmitted.
void Cancel(void)
Cancel the timer.
This class is used to handle the timer that a station starts when transmitting a frame that solicits ...