25 #include "ns3/callback.h"
26 #include "ns3/packet.h"
27 #include "ns3/nstime.h"
28 #include "ns3/object.h"
29 #include "ns3/wifi-mac-header.h"
30 #include "ns3/wifi-mode.h"
31 #include "ns3/wifi-remote-station-manager.h"
40 class WifiMacParameters;
122 virtual void SetMinCw (uint32_t minCw);
123 virtual void SetMaxCw (uint32_t maxCw);
124 virtual void SetAifsn (uint32_t aifsn);
125 virtual uint32_t
GetMinCw (
void)
const;
126 virtual uint32_t
GetMaxCw (
void)
const;
127 virtual uint32_t
GetAifsn (
void)
const;
void NotifyInternalCollision(void)
Notify the DCF that internal collision has occurred.
DcaTxop & operator=(const DcaTxop &)
virtual uint32_t GetMaxCw(void) const
Return the maximum congestion window size.
Callback< void, const WifiMacHeader & > TxFailed
typedef for a callback to invoke when a packet transmission was failed.
smart pointer class similar to boost::intrusive_ptr
uint32_t GetFragmentOffset(void)
Calculate the offset for the current fragment.
void SetTxFailedCallback(TxFailed callback)
virtual void SetMaxCw(uint32_t maxCw)
Set the maximum congestion window size.
void StartNext(void)
Start transmission for the next fragment.
Ptr< MacLow > Low(void)
Return the MacLow associated with this DcaTxop.
virtual uint32_t GetAifsn(void) const
Return the number of slots that make up an AIFS.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
static TypeId GetTypeId(void)
void SetTxOkCallback(TxOk callback)
Handles sequence numbering of IEEE 802.11 data frames.
Ptr< Packet > GetFragmentPacket(WifiMacHeader *hdr)
Get the next fragment from the packet with appropriate Wifi header for the fragment.
void Queue(Ptr< const Packet > packet, const WifiMacHeader &hdr)
void SetLow(Ptr< MacLow > low)
Set MacLow associated with this DcaTxop.
bool NeedFragmentation(void)
Check if the current packet should be fragmented.
Ptr< WifiMacQueue > m_queue
void Cancel(void)
Cancel the transmission.
void GotCts(double snr, WifiMode txMode)
Event handler when a CTS is received.
void NotifyChannelSwitching(void)
When a channel switching occurs, enqueued packets are removed.
void MissedCts(void)
Event handler when a CTS timeout has occurred.
Manage a set of ns3::DcfStateHandle a set of independent ns3::DcfState, each of which represents a si...
A simple wrapper around RngStream to make testing of the code easier.
bool IsLastFragment(void)
Check if the curren fragment is the last fragment.
Ptr< WifiRemoteStationManager > m_stationManager
bool NeedRts(Ptr< const Packet > packet, const WifiMacHeader *header)
Check if the current packet should be sent with a RTS protection.
virtual void SetAifsn(uint32_t aifsn)
void SetWifiRemoteStationManager(Ptr< WifiRemoteStationManager > remoteManager)
Set WifiRemoteStationsManager this DcaTxop is associated to.
Callback< void, const WifiMacHeader & > TxOk
typedef for a callback to invoke when a packet transmission was completed successfully.
void DoInitialize()
This method is called only once by Object::Initialize.
bool NeedsAccess(void) const
Check if the DCF requires access.
WifiMacHeader m_currentHdr
Ptr< WifiMacQueue > GetQueue() const
Return the packet queue associated with this DcaTxop.
bool NeedRtsRetransmission(void)
Check if RTS should be re-transmitted if CTS was missed.
Ptr< const Packet > m_currentPacket
Listener for MacLow events.
virtual void SetMinCw(uint32_t minCw)
Set the minimum congestion window size.
void GotAck(double snr, WifiMode txMode)
Event handler when an ACK is received.
void SetManager(DcfManager *manager)
Set DcfManager this DcaTxop is associated to.
uint32_t GetNextFragmentSize(void)
Calculate the size of the next fragment.
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
void NotifyCollision(void)
Notify the DCF that collision has occurred.
void StartAccessIfNeeded(void)
Request access from DCF manager if needed.
void NextFragment(void)
Continue to the next fragment.
TransmissionListener * m_transmissionListener
void RestartAccessIfNeeded(void)
Restart access request if needed.
void MissedAck(void)
Event handler when an ACK is received.
handle packet fragmentation and retransmissions.
bool NeedDataRetransmission(void)
Check if DATA should be re-transmitted if ACK was missed.
virtual uint32_t GetMinCw(void) const
Return the minimum congestion window size.
uint32_t GetFragmentSize(void)
Calculate the size of the current fragment.
a unique identifier for an interface.
void NotifyAccessGranted(void)
Notify the DCF that access has been granted.
void EndTxNoAck(void)
Event handler when a transmission that does not require an ACK has completed.
TxFailed m_txFailedCallback