wifi: Add missing const
This commit is contained in:
@@ -41,7 +41,7 @@ BlockAckCache::Init (uint16_t winStart, uint16_t winSize)
|
||||
}
|
||||
|
||||
uint16_t
|
||||
BlockAckCache::GetWinStart ()
|
||||
BlockAckCache::GetWinStart () const
|
||||
{
|
||||
return m_winStart;
|
||||
}
|
||||
@@ -111,7 +111,7 @@ BlockAckCache::ResetPortionOfBitmap (uint16_t start, uint16_t end)
|
||||
}
|
||||
|
||||
bool
|
||||
BlockAckCache::IsInWindow (uint16_t seq)
|
||||
BlockAckCache::IsInWindow (uint16_t seq) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this << seq);
|
||||
return ((seq - m_winStart + 4096) % 4096) < m_winSize;
|
||||
|
||||
@@ -45,14 +45,14 @@ public:
|
||||
* depending on the sequence number of the received MPDU (standard11n page 134).
|
||||
* This function is used to retrieve this value in order to add it to the BlockAck.
|
||||
*/
|
||||
uint16_t GetWinStart (void);
|
||||
uint16_t GetWinStart (void) const;
|
||||
|
||||
void FillBlockAckBitmap (CtrlBAckResponseHeader *blockAckHeader);
|
||||
|
||||
|
||||
private:
|
||||
void ResetPortionOfBitmap (uint16_t start, uint16_t end);
|
||||
bool IsInWindow (uint16_t seq);
|
||||
bool IsInWindow (uint16_t seq) const;
|
||||
|
||||
uint16_t m_winStart;
|
||||
uint8_t m_winSize;
|
||||
|
||||
@@ -558,7 +558,7 @@ BlockAckManager::SetWifiRemoteStationManager (Ptr<WifiRemoteStationManager> mana
|
||||
}
|
||||
|
||||
bool
|
||||
BlockAckManager::AlreadyExists (uint16_t currentSeq, Mac48Address recipient, uint8_t tid)
|
||||
BlockAckManager::AlreadyExists (uint16_t currentSeq, Mac48Address recipient, uint8_t tid) const
|
||||
{
|
||||
std::list<PacketQueueI>::const_iterator it = m_retryPackets.begin ();
|
||||
while (it != m_retryPackets.end ())
|
||||
|
||||
@@ -319,7 +319,7 @@ public:
|
||||
/**
|
||||
* Checks if the packet already exists in the retransmit queue or not if it does then it doesn't add it again
|
||||
*/
|
||||
bool AlreadyExists (uint16_t currentSeq, Mac48Address recipient, uint8_t tid);
|
||||
bool AlreadyExists (uint16_t currentSeq, Mac48Address recipient, uint8_t tid) const;
|
||||
/**
|
||||
* Remove a packet after you peek in the queue and get it
|
||||
*/
|
||||
|
||||
@@ -329,7 +329,7 @@ DcaTxop::StartAccessIfNeeded (void)
|
||||
}
|
||||
|
||||
Ptr<MacLow>
|
||||
DcaTxop::Low (void)
|
||||
DcaTxop::GetLow (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_low;
|
||||
@@ -345,7 +345,7 @@ DcaTxop::DoInitialize ()
|
||||
}
|
||||
|
||||
bool
|
||||
DcaTxop::NeedRtsRetransmission (void)
|
||||
DcaTxop::NeedRtsRetransmission (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_stationManager->NeedRtsRetransmission (m_currentHdr.GetAddr1 (), &m_currentHdr,
|
||||
@@ -353,7 +353,7 @@ DcaTxop::NeedRtsRetransmission (void)
|
||||
}
|
||||
|
||||
bool
|
||||
DcaTxop::NeedDataRetransmission (void)
|
||||
DcaTxop::NeedDataRetransmission (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_stationManager->NeedDataRetransmission (m_currentHdr.GetAddr1 (), &m_currentHdr,
|
||||
@@ -361,7 +361,7 @@ DcaTxop::NeedDataRetransmission (void)
|
||||
}
|
||||
|
||||
bool
|
||||
DcaTxop::NeedFragmentation (void)
|
||||
DcaTxop::NeedFragmentation (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_stationManager->NeedFragmentation (m_currentHdr.GetAddr1 (), &m_currentHdr,
|
||||
@@ -376,7 +376,7 @@ DcaTxop::NextFragment (void)
|
||||
}
|
||||
|
||||
uint32_t
|
||||
DcaTxop::GetFragmentSize (void)
|
||||
DcaTxop::GetFragmentSize (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_stationManager->GetFragmentSize (m_currentHdr.GetAddr1 (), &m_currentHdr,
|
||||
@@ -384,7 +384,7 @@ DcaTxop::GetFragmentSize (void)
|
||||
}
|
||||
|
||||
bool
|
||||
DcaTxop::IsLastFragment (void)
|
||||
DcaTxop::IsLastFragment (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_stationManager->IsLastFragment (m_currentHdr.GetAddr1 (), &m_currentHdr,
|
||||
@@ -392,7 +392,7 @@ DcaTxop::IsLastFragment (void)
|
||||
}
|
||||
|
||||
uint32_t
|
||||
DcaTxop::GetNextFragmentSize (void)
|
||||
DcaTxop::GetNextFragmentSize (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_stationManager->GetFragmentSize (m_currentHdr.GetAddr1 (), &m_currentHdr,
|
||||
@@ -400,7 +400,7 @@ DcaTxop::GetNextFragmentSize (void)
|
||||
}
|
||||
|
||||
uint32_t
|
||||
DcaTxop::GetFragmentOffset (void)
|
||||
DcaTxop::GetFragmentOffset (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_stationManager->GetFragmentOffset (m_currentHdr.GetAddr1 (), &m_currentHdr,
|
||||
@@ -465,7 +465,7 @@ DcaTxop::NotifyAccessGranted (void)
|
||||
params.DisableRts ();
|
||||
params.DisableAck ();
|
||||
params.DisableNextData ();
|
||||
Low ()->StartTransmission (m_currentPacket,
|
||||
GetLow ()->StartTransmission (m_currentPacket,
|
||||
&m_currentHdr,
|
||||
params,
|
||||
m_transmissionListener);
|
||||
@@ -489,13 +489,13 @@ DcaTxop::NotifyAccessGranted (void)
|
||||
NS_LOG_DEBUG ("fragmenting size=" << fragment->GetSize ());
|
||||
params.EnableNextData (GetNextFragmentSize ());
|
||||
}
|
||||
Low ()->StartTransmission (fragment, &hdr, params,
|
||||
GetLow ()->StartTransmission (fragment, &hdr, params,
|
||||
m_transmissionListener);
|
||||
}
|
||||
else
|
||||
{
|
||||
params.DisableNextData ();
|
||||
Low ()->StartTransmission (m_currentPacket, &m_currentHdr,
|
||||
GetLow ()->StartTransmission (m_currentPacket, &m_currentHdr,
|
||||
params, m_transmissionListener);
|
||||
}
|
||||
}
|
||||
@@ -649,7 +649,7 @@ DcaTxop::StartNextFragment (void)
|
||||
{
|
||||
params.EnableNextData (GetNextFragmentSize ());
|
||||
}
|
||||
Low ()->StartTransmission (fragment, &hdr, params, m_transmissionListener);
|
||||
GetLow ()->StartTransmission (fragment, &hdr, params, m_transmissionListener);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -113,6 +113,13 @@ public:
|
||||
*/
|
||||
void SetTxFailedCallback (TxFailed callback);
|
||||
|
||||
/**
|
||||
* Return the MacLow associated with this DcaTxop.
|
||||
*
|
||||
* \return MacLow
|
||||
*/
|
||||
Ptr<MacLow> GetLow (void) const;
|
||||
|
||||
/**
|
||||
* Return the packet queue associated with this DcaTxop.
|
||||
*
|
||||
@@ -162,12 +169,6 @@ private:
|
||||
DcaTxop (const DcaTxop &o);
|
||||
|
||||
//Inherited from ns3::Object
|
||||
/**
|
||||
* Return the MacLow associated with this DcaTxop.
|
||||
*
|
||||
* \return MacLow
|
||||
*/
|
||||
Ptr<MacLow> Low (void);
|
||||
void DoInitialize ();
|
||||
/* dcf notifications forwarded here */
|
||||
/**
|
||||
@@ -257,46 +258,46 @@ private:
|
||||
* \return true if RTS should be re-transmitted,
|
||||
* false otherwise
|
||||
*/
|
||||
bool NeedRtsRetransmission (void);
|
||||
bool NeedRtsRetransmission (void) const;
|
||||
/**
|
||||
* Check if DATA should be re-transmitted if ACK was missed.
|
||||
*
|
||||
* \return true if DATA should be re-transmitted,
|
||||
* false otherwise
|
||||
*/
|
||||
bool NeedDataRetransmission (void);
|
||||
bool NeedDataRetransmission (void) const;
|
||||
/**
|
||||
* Check if the current packet should be fragmented.
|
||||
*
|
||||
* \return true if the current packet should be fragmented,
|
||||
* false otherwise
|
||||
*/
|
||||
bool NeedFragmentation (void);
|
||||
bool NeedFragmentation (void) const;
|
||||
/**
|
||||
* Calculate the size of the next fragment.
|
||||
*
|
||||
* \return the size of the next fragment
|
||||
*/
|
||||
uint32_t GetNextFragmentSize (void);
|
||||
uint32_t GetNextFragmentSize (void) const;
|
||||
/**
|
||||
* Calculate the size of the current fragment.
|
||||
*
|
||||
* \return the size of the current fragment
|
||||
*/
|
||||
uint32_t GetFragmentSize (void);
|
||||
uint32_t GetFragmentSize (void) const;
|
||||
/**
|
||||
* Calculate the offset for the current fragment.
|
||||
*
|
||||
* \return the offset for the current fragment
|
||||
*/
|
||||
uint32_t GetFragmentOffset (void);
|
||||
uint32_t GetFragmentOffset (void) const;
|
||||
/**
|
||||
* Check if the curren fragment is the last fragment.
|
||||
*
|
||||
* \return true if the curren fragment is the last fragment,
|
||||
* false otherwise
|
||||
*/
|
||||
bool IsLastFragment (void);
|
||||
bool IsLastFragment (void) const;
|
||||
/**
|
||||
* Continue to the next fragment. This method simply
|
||||
* increments the internal variable that keep track
|
||||
|
||||
@@ -315,7 +315,7 @@ EdcaTxopN::GetBaAgreementExists (Mac48Address address, uint8_t tid) const
|
||||
}
|
||||
|
||||
uint32_t
|
||||
EdcaTxopN::GetNOutstandingPacketsInBa (Mac48Address address, uint8_t tid)
|
||||
EdcaTxopN::GetNOutstandingPacketsInBa (Mac48Address address, uint8_t tid) const
|
||||
{
|
||||
return m_baManager->GetNBufferedPackets (address, tid);
|
||||
}
|
||||
@@ -447,7 +447,7 @@ EdcaTxopN::SetTxMiddle (MacTxMiddle *txMiddle)
|
||||
}
|
||||
|
||||
Ptr<MacLow>
|
||||
EdcaTxopN::Low (void)
|
||||
EdcaTxopN::GetLow (void) const
|
||||
{
|
||||
return m_low;
|
||||
}
|
||||
@@ -1177,7 +1177,7 @@ EdcaTxopN::StartNextFragment (void)
|
||||
{
|
||||
params.EnableNextData (GetNextFragmentSize ());
|
||||
}
|
||||
Low ()->StartTransmission (fragment, &hdr, params, m_transmissionListener);
|
||||
GetLow ()->StartTransmission (fragment, &hdr, params, m_transmissionListener);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1218,19 +1218,19 @@ EdcaTxopN::StartNext (void)
|
||||
params.DisableRts ();
|
||||
}
|
||||
|
||||
if (GetTxopRemaining () >= Low ()->CalculateOverallTxTime (peekedPacket, &hdr, params))
|
||||
if (GetTxopRemaining () >= GetLow ()->CalculateOverallTxTime (peekedPacket, &hdr, params))
|
||||
{
|
||||
NS_LOG_DEBUG ("start next packet");
|
||||
m_currentPacket = m_queue->DequeueByTidAndAddress (&hdr,
|
||||
m_currentHdr.GetQosTid (),
|
||||
WifiMacHeader::ADDR1,
|
||||
m_currentHdr.GetAddr1 ());
|
||||
Low ()->StartTransmission (m_currentPacket, &m_currentHdr, params, m_transmissionListener);
|
||||
GetLow ()->StartTransmission (m_currentPacket, &m_currentHdr, params, m_transmissionListener);
|
||||
}
|
||||
}
|
||||
|
||||
Time
|
||||
EdcaTxopN::GetTxopRemaining (void)
|
||||
EdcaTxopN::GetTxopRemaining (void) const
|
||||
{
|
||||
Time remainingTxop = GetTxopLimit ();
|
||||
remainingTxop -= (Simulator::Now () - m_startTxop);
|
||||
@@ -1243,7 +1243,7 @@ EdcaTxopN::GetTxopRemaining (void)
|
||||
}
|
||||
|
||||
bool
|
||||
EdcaTxopN::HasTxop (void)
|
||||
EdcaTxopN::HasTxop (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
WifiMacHeader hdr;
|
||||
@@ -1284,7 +1284,7 @@ EdcaTxopN::HasTxop (void)
|
||||
params.DisableRts ();
|
||||
}
|
||||
|
||||
return (GetTxopRemaining () >= Low ()->CalculateOverallTxTime (peekedPacket, &hdr, params));
|
||||
return (GetTxopRemaining () >= GetLow ()->CalculateOverallTxTime (peekedPacket, &hdr, params));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1327,7 +1327,7 @@ EdcaTxopN::NeedFragmentation (void) const
|
||||
}
|
||||
|
||||
uint32_t
|
||||
EdcaTxopN::GetFragmentSize (void)
|
||||
EdcaTxopN::GetFragmentSize (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_stationManager->GetFragmentSize (m_currentHdr.GetAddr1 (), &m_currentHdr,
|
||||
@@ -1335,7 +1335,7 @@ EdcaTxopN::GetFragmentSize (void)
|
||||
}
|
||||
|
||||
uint32_t
|
||||
EdcaTxopN::GetNextFragmentSize (void)
|
||||
EdcaTxopN::GetNextFragmentSize (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_stationManager->GetFragmentSize (m_currentHdr.GetAddr1 (), &m_currentHdr,
|
||||
@@ -1343,7 +1343,7 @@ EdcaTxopN::GetNextFragmentSize (void)
|
||||
}
|
||||
|
||||
uint32_t
|
||||
EdcaTxopN::GetFragmentOffset (void)
|
||||
EdcaTxopN::GetFragmentOffset (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_stationManager->GetFragmentOffset (m_currentHdr.GetAddr1 (), &m_currentHdr,
|
||||
|
||||
@@ -158,7 +158,7 @@ public:
|
||||
*
|
||||
* \return MacLow
|
||||
*/
|
||||
Ptr<MacLow> Low (void);
|
||||
Ptr<MacLow> GetLow (void) const;
|
||||
|
||||
Ptr<MsduAggregator> GetMsduAggregator (void) const;
|
||||
Ptr<MpduAggregator> GetMpduAggregator (void) const;
|
||||
@@ -179,7 +179,7 @@ public:
|
||||
*
|
||||
* Returns number of packets buffered for a specified agreement.
|
||||
*/
|
||||
uint32_t GetNOutstandingPacketsInBa (Mac48Address address, uint8_t tid);
|
||||
uint32_t GetNOutstandingPacketsInBa (Mac48Address address, uint8_t tid) const;
|
||||
/**
|
||||
* \param recipient address of peer station involved in block ack mechanism.
|
||||
* \param tid traffic ID.
|
||||
@@ -332,19 +332,19 @@ public:
|
||||
*
|
||||
* \return the size of the next fragment
|
||||
*/
|
||||
uint32_t GetNextFragmentSize (void);
|
||||
uint32_t GetNextFragmentSize (void) const;
|
||||
/**
|
||||
* Calculate the size of the current fragment.
|
||||
*
|
||||
* \return the size of the current fragment
|
||||
*/
|
||||
uint32_t GetFragmentSize (void);
|
||||
uint32_t GetFragmentSize (void) const;
|
||||
/**
|
||||
* Calculate the offset for the current fragment.
|
||||
*
|
||||
* \return the offset for the current fragment
|
||||
*/
|
||||
uint32_t GetFragmentOffset (void);
|
||||
uint32_t GetFragmentOffset (void) const;
|
||||
/**
|
||||
* Check if the current fragment is the last fragment.
|
||||
*
|
||||
@@ -528,14 +528,14 @@ private:
|
||||
*
|
||||
* \return the remaining duration in the current TXOP
|
||||
*/
|
||||
Time GetTxopRemaining (void);
|
||||
Time GetTxopRemaining (void) const;
|
||||
/*
|
||||
* Check if the station has TXOP granted for the next MPDU.
|
||||
*
|
||||
* \return true if the station has TXOP granted for the next MPDU,
|
||||
* false otherwise
|
||||
*/
|
||||
bool HasTxop (void);
|
||||
bool HasTxop (void) const;
|
||||
|
||||
AcIndex m_ac;
|
||||
class Dcf;
|
||||
|
||||
@@ -818,7 +818,7 @@ MacLow::StartTransmission (Ptr<const Packet> packet,
|
||||
}
|
||||
|
||||
bool
|
||||
MacLow::NeedRts (void)
|
||||
MacLow::NeedRts (void) const
|
||||
{
|
||||
WifiTxVector dataTxVector = GetDataTxVector (m_currentPacket, &m_currentHdr);
|
||||
return m_stationManager->NeedRts (m_currentHdr.GetAddr1 (), &m_currentHdr,
|
||||
@@ -826,7 +826,7 @@ MacLow::NeedRts (void)
|
||||
}
|
||||
|
||||
bool
|
||||
MacLow::NeedCtsToSelf (void)
|
||||
MacLow::NeedCtsToSelf (void) const
|
||||
{
|
||||
WifiTxVector dataTxVector = GetDataTxVector (m_currentPacket, &m_currentHdr);
|
||||
return m_stationManager->NeedCtsToSelf (dataTxVector);
|
||||
@@ -2161,7 +2161,7 @@ MacLow::SendAckAfterData (Mac48Address source, Time duration, WifiMode dataTxMod
|
||||
}
|
||||
|
||||
bool
|
||||
MacLow::IsInWindow (uint16_t seq, uint16_t winstart, uint16_t winsize)
|
||||
MacLow::IsInWindow (uint16_t seq, uint16_t winstart, uint16_t winsize) const
|
||||
{
|
||||
return ((seq - winstart + 4096) % 4096) < winsize;
|
||||
}
|
||||
|
||||
@@ -1007,14 +1007,14 @@ private:
|
||||
* \return true if RTS protection should be used,
|
||||
* false otherwise
|
||||
*/
|
||||
bool NeedRts (void);
|
||||
bool NeedRts (void) const;
|
||||
/**
|
||||
* Check if CTS-to-self mechanism should be used for the current packet.
|
||||
*
|
||||
* \return true if CTS-to-self mechanism should be used for the current packet,
|
||||
* false otherwise
|
||||
*/
|
||||
bool NeedCtsToSelf (void);
|
||||
bool NeedCtsToSelf (void) const;
|
||||
|
||||
void NotifyNav (Ptr<const Packet> packet,const WifiMacHeader &hdr, WifiPreamble preamble);
|
||||
/**
|
||||
@@ -1183,7 +1183,7 @@ private:
|
||||
* \param winsize the size of the sequence number window (currently default is 64)
|
||||
* This method checks if the MPDU's sequence number is inside the scoreboard boundaries or not
|
||||
*/
|
||||
bool IsInWindow (uint16_t seq, uint16_t winstart, uint16_t winsize);
|
||||
bool IsInWindow (uint16_t seq, uint16_t winstart, uint16_t winsize) const;
|
||||
/**
|
||||
* This method updates the reorder buffer and the scoreboard when an MPDU is received in an HT station
|
||||
* and sotres the MPDU if needed when an MPDU is received in an non-HT Station (implements HT
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
* \return true if we are de-fragmenting packets,
|
||||
* false otherwise
|
||||
*/
|
||||
bool IsDeFragmenting (void)
|
||||
bool IsDeFragmenting (void) const
|
||||
{
|
||||
return m_defragmenting;
|
||||
}
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
* \return true if the sequence control is in order,
|
||||
* false otherwise
|
||||
*/
|
||||
bool IsNextFragment (uint16_t sequenceControl)
|
||||
bool IsNextFragment (uint16_t sequenceControl) const
|
||||
{
|
||||
if ((sequenceControl >> 4) == (m_lastSequenceControl >> 4)
|
||||
&& (sequenceControl & 0x0f) == ((m_lastSequenceControl & 0x0f) + 1))
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
*
|
||||
* \return the last sequence control
|
||||
*/
|
||||
uint16_t GetLastSequenceControl (void)
|
||||
uint16_t GetLastSequenceControl (void) const
|
||||
{
|
||||
return m_lastSequenceControl;
|
||||
}
|
||||
|
||||
@@ -58,15 +58,15 @@ public:
|
||||
* Adds <i>packet</i> to <i>aggregatedPacket</i>. In concrete aggregator's implementation is
|
||||
* specified how and if <i>packet</i> can be added to <i>aggregatedPacket</i>.
|
||||
*/
|
||||
virtual bool Aggregate (Ptr<const Packet> packet, Ptr<Packet> aggregatedPacket) = 0;
|
||||
virtual bool Aggregate (Ptr<const Packet> packet, Ptr<Packet> aggregatedPacket) const = 0;
|
||||
/**
|
||||
* This method performs a VHT single MPDU aggregation.
|
||||
*/
|
||||
virtual void AggregateVhtSingleMpdu (Ptr<const Packet> packet, Ptr<Packet> aggregatedPacket) = 0;
|
||||
virtual void AggregateVhtSingleMpdu (Ptr<const Packet> packet, Ptr<Packet> aggregatedPacket) const = 0;
|
||||
/**
|
||||
* Adds A-MPDU subframe header and padding to each MPDU that is part of an A-MPDU before it is sent.
|
||||
*/
|
||||
virtual void AddHeaderAndPad (Ptr<Packet> packet, bool last, bool vhtSingleMpdu) = 0;
|
||||
virtual void AddHeaderAndPad (Ptr<Packet> packet, bool last, bool vhtSingleMpdu) const = 0;
|
||||
/**
|
||||
* \param packetSize size of the packet we want to insert into <i>aggregatedPacket</i>.
|
||||
* \param aggregatedPacket packet that will contain the packet of size <i>packetSize</i>, if aggregation is possible.
|
||||
@@ -76,14 +76,14 @@ public:
|
||||
*
|
||||
* This method is used to determine if a packet could be aggregated to an A-MPDU without exceeding the maximum packet size.
|
||||
*/
|
||||
virtual bool CanBeAggregated (uint32_t packetSize, Ptr<Packet> aggregatedPacket, uint8_t blockAckSize) = 0;
|
||||
virtual bool CanBeAggregated (uint32_t packetSize, Ptr<Packet> aggregatedPacket, uint8_t blockAckSize) const = 0;
|
||||
/**
|
||||
* \return padding that must be added to the end of an aggregated packet
|
||||
*
|
||||
* Calculates how much padding must be added to the end of an aggregated packet, after that a new packet is added.
|
||||
* Each A-MPDU subframe is padded so that its length is multiple of 4 octets.
|
||||
*/
|
||||
virtual uint32_t CalculatePadding (Ptr<const Packet> packet) = 0;
|
||||
virtual uint32_t CalculatePadding (Ptr<const Packet> packet) const = 0;
|
||||
/**
|
||||
* Deaggregates an A-MPDU by removing the A-MPDU subframe header and padding.
|
||||
*
|
||||
|
||||
@@ -64,7 +64,7 @@ MpduStandardAggregator::GetMaxAmpduSize (void) const
|
||||
}
|
||||
|
||||
bool
|
||||
MpduStandardAggregator::Aggregate (Ptr<const Packet> packet, Ptr<Packet> aggregatedPacket)
|
||||
MpduStandardAggregator::Aggregate (Ptr<const Packet> packet, Ptr<Packet> aggregatedPacket) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
Ptr<Packet> currentPacket;
|
||||
@@ -93,7 +93,7 @@ MpduStandardAggregator::Aggregate (Ptr<const Packet> packet, Ptr<Packet> aggrega
|
||||
}
|
||||
|
||||
void
|
||||
MpduStandardAggregator::AggregateVhtSingleMpdu (Ptr<const Packet> packet, Ptr<Packet> aggregatedPacket)
|
||||
MpduStandardAggregator::AggregateVhtSingleMpdu (Ptr<const Packet> packet, Ptr<Packet> aggregatedPacket) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
Ptr<Packet> currentPacket;
|
||||
@@ -117,7 +117,7 @@ MpduStandardAggregator::AggregateVhtSingleMpdu (Ptr<const Packet> packet, Ptr<Pa
|
||||
}
|
||||
|
||||
void
|
||||
MpduStandardAggregator::AddHeaderAndPad (Ptr<Packet> packet, bool last, bool vhtSingleMpdu)
|
||||
MpduStandardAggregator::AddHeaderAndPad (Ptr<Packet> packet, bool last, bool vhtSingleMpdu) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
AmpduSubframeHeader currentHdr;
|
||||
@@ -143,7 +143,7 @@ MpduStandardAggregator::AddHeaderAndPad (Ptr<Packet> packet, bool last, bool vht
|
||||
}
|
||||
|
||||
bool
|
||||
MpduStandardAggregator::CanBeAggregated (uint32_t packetSize, Ptr<Packet> aggregatedPacket, uint8_t blockAckSize)
|
||||
MpduStandardAggregator::CanBeAggregated (uint32_t packetSize, Ptr<Packet> aggregatedPacket, uint8_t blockAckSize) const
|
||||
{
|
||||
uint32_t padding = CalculatePadding (aggregatedPacket);
|
||||
uint32_t actualSize = aggregatedPacket->GetSize ();
|
||||
@@ -162,7 +162,7 @@ MpduStandardAggregator::CanBeAggregated (uint32_t packetSize, Ptr<Packet> aggreg
|
||||
}
|
||||
|
||||
uint32_t
|
||||
MpduStandardAggregator::CalculatePadding (Ptr<const Packet> packet)
|
||||
MpduStandardAggregator::CalculatePadding (Ptr<const Packet> packet) const
|
||||
{
|
||||
return (4 - (packet->GetSize () % 4 )) % 4;
|
||||
}
|
||||
|
||||
@@ -49,15 +49,15 @@ public:
|
||||
* This method performs an MPDU aggregation.
|
||||
* Returns true if <i>packet</i> can be aggregated to <i>aggregatedPacket</i>, false otherwise.
|
||||
*/
|
||||
virtual bool Aggregate (Ptr<const Packet> packet, Ptr<Packet> aggregatedPacket);
|
||||
virtual bool Aggregate (Ptr<const Packet> packet, Ptr<Packet> aggregatedPacket) const;
|
||||
/**
|
||||
* This method performs a VHT single MPDU aggregation.
|
||||
*/
|
||||
virtual void AggregateVhtSingleMpdu (Ptr<const Packet> packet, Ptr<Packet> aggregatedPacket);
|
||||
virtual void AggregateVhtSingleMpdu (Ptr<const Packet> packet, Ptr<Packet> aggregatedPacket) const;
|
||||
/**
|
||||
* Adds A-MPDU subframe header and padding to each MPDU that is part of an A-MPDU before it is sent.
|
||||
*/
|
||||
virtual void AddHeaderAndPad (Ptr<Packet> packet, bool last, bool vhtSingleMpdu);
|
||||
virtual void AddHeaderAndPad (Ptr<Packet> packet, bool last, bool vhtSingleMpdu) const;
|
||||
/**
|
||||
* \param packetSize size of the packet we want to insert into <i>aggregatedPacket</i>.
|
||||
* \param aggregatedPacket packet that will contain the packet of size <i>packetSize</i>, if aggregation is possible.
|
||||
@@ -68,14 +68,14 @@ public:
|
||||
*
|
||||
* This method is used to determine if a packet could be aggregated to an A-MPDU without exceeding the maximum packet size.
|
||||
*/
|
||||
virtual bool CanBeAggregated (uint32_t packetSize, Ptr<Packet> aggregatedPacket, uint8_t blockAckSize);
|
||||
virtual bool CanBeAggregated (uint32_t packetSize, Ptr<Packet> aggregatedPacket, uint8_t blockAckSize) const;
|
||||
/**
|
||||
* \return padding that must be added to the end of an aggregated packet
|
||||
*
|
||||
* Calculates how much padding must be added to the end of an aggregated packet, after that a new packet is added.
|
||||
* Each A-MPDU subframe is padded so that its length is multiple of 4 octets.
|
||||
*/
|
||||
virtual uint32_t CalculatePadding (Ptr<const Packet> packet);
|
||||
virtual uint32_t CalculatePadding (Ptr<const Packet> packet) const;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
* can be added returns true, false otherwise.
|
||||
*/
|
||||
virtual bool Aggregate (Ptr<const Packet> packet, Ptr<Packet> aggregatedPacket,
|
||||
Mac48Address src, Mac48Address dest) = 0;
|
||||
Mac48Address src, Mac48Address dest) const = 0;
|
||||
|
||||
static DeaggregatedMsdus Deaggregate (Ptr<Packet> aggregatedPacket);
|
||||
};
|
||||
|
||||
@@ -65,7 +65,7 @@ MsduStandardAggregator::GetMaxAmsduSize (void) const
|
||||
|
||||
bool
|
||||
MsduStandardAggregator::Aggregate (Ptr<const Packet> packet, Ptr<Packet> aggregatedPacket,
|
||||
Mac48Address src, Mac48Address dest)
|
||||
Mac48Address src, Mac48Address dest) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
Ptr<Packet> currentPacket;
|
||||
@@ -94,7 +94,7 @@ MsduStandardAggregator::Aggregate (Ptr<const Packet> packet, Ptr<Packet> aggrega
|
||||
}
|
||||
|
||||
uint32_t
|
||||
MsduStandardAggregator::CalculatePadding (Ptr<const Packet> packet)
|
||||
MsduStandardAggregator::CalculatePadding (Ptr<const Packet> packet) const
|
||||
{
|
||||
return (4 - (packet->GetSize () % 4 )) % 4;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
* Returns true if <i>packet</i> can be aggregated to <i>aggregatedPacket</i>, false otherwise.
|
||||
*/
|
||||
virtual bool Aggregate (Ptr<const Packet> packet, Ptr<Packet> aggregatedPacket,
|
||||
Mac48Address src, Mac48Address dest);
|
||||
Mac48Address src, Mac48Address dest) const;
|
||||
private:
|
||||
/**
|
||||
* Calculates how much padding must be added to the end of aggregated packet,
|
||||
@@ -63,7 +63,7 @@ private:
|
||||
*
|
||||
* \return the number of octets required for padding
|
||||
*/
|
||||
uint32_t CalculatePadding (Ptr<const Packet> packet);
|
||||
uint32_t CalculatePadding (Ptr<const Packet> packet) const;
|
||||
|
||||
uint32_t m_maxAmsduLength;
|
||||
};
|
||||
|
||||
@@ -599,7 +599,7 @@ WifiModeFactory::CreateWifiMcs (std::string uniqueName,
|
||||
}
|
||||
|
||||
WifiMode
|
||||
WifiModeFactory::Search (std::string name)
|
||||
WifiModeFactory::Search (std::string name) const
|
||||
{
|
||||
WifiModeItemList::const_iterator i;
|
||||
uint32_t j = 0;
|
||||
|
||||
@@ -313,7 +313,7 @@ private:
|
||||
*
|
||||
* \return WifiMode
|
||||
*/
|
||||
WifiMode Search (std::string name);
|
||||
WifiMode Search (std::string name) const;
|
||||
/**
|
||||
* Allocate a WifiModeItem from a given uniqueUid.
|
||||
*
|
||||
|
||||
@@ -101,55 +101,55 @@ WifiPhyStateHelper::UnregisterListener (WifiPhyListener *listener)
|
||||
}
|
||||
|
||||
bool
|
||||
WifiPhyStateHelper::IsStateIdle (void)
|
||||
WifiPhyStateHelper::IsStateIdle (void) const
|
||||
{
|
||||
return (GetState () == WifiPhy::IDLE);
|
||||
}
|
||||
|
||||
bool
|
||||
WifiPhyStateHelper::IsStateBusy (void)
|
||||
WifiPhyStateHelper::IsStateBusy (void) const
|
||||
{
|
||||
return (GetState () != WifiPhy::IDLE);
|
||||
}
|
||||
|
||||
bool
|
||||
WifiPhyStateHelper::IsStateCcaBusy (void)
|
||||
WifiPhyStateHelper::IsStateCcaBusy (void) const
|
||||
{
|
||||
return (GetState () == WifiPhy::CCA_BUSY);
|
||||
}
|
||||
|
||||
bool
|
||||
WifiPhyStateHelper::IsStateRx (void)
|
||||
WifiPhyStateHelper::IsStateRx (void) const
|
||||
{
|
||||
return (GetState () == WifiPhy::RX);
|
||||
}
|
||||
|
||||
bool
|
||||
WifiPhyStateHelper::IsStateTx (void)
|
||||
WifiPhyStateHelper::IsStateTx (void) const
|
||||
{
|
||||
return (GetState () == WifiPhy::TX);
|
||||
}
|
||||
|
||||
bool
|
||||
WifiPhyStateHelper::IsStateSwitching (void)
|
||||
WifiPhyStateHelper::IsStateSwitching (void) const
|
||||
{
|
||||
return (GetState () == WifiPhy::SWITCHING);
|
||||
}
|
||||
|
||||
bool
|
||||
WifiPhyStateHelper::IsStateSleep (void)
|
||||
WifiPhyStateHelper::IsStateSleep (void) const
|
||||
{
|
||||
return (GetState () == WifiPhy::SLEEP);
|
||||
}
|
||||
|
||||
Time
|
||||
WifiPhyStateHelper::GetStateDuration (void)
|
||||
WifiPhyStateHelper::GetStateDuration (void) const
|
||||
{
|
||||
return Simulator::Now () - m_previousStateChangeTime;
|
||||
}
|
||||
|
||||
Time
|
||||
WifiPhyStateHelper::GetDelayUntilIdle (void)
|
||||
WifiPhyStateHelper::GetDelayUntilIdle (void) const
|
||||
{
|
||||
Time retval;
|
||||
|
||||
@@ -190,7 +190,7 @@ WifiPhyStateHelper::GetLastRxStartTime (void) const
|
||||
}
|
||||
|
||||
WifiPhy::State
|
||||
WifiPhyStateHelper::GetState (void)
|
||||
WifiPhyStateHelper::GetState (void) const
|
||||
{
|
||||
if (m_sleeping)
|
||||
{
|
||||
|
||||
@@ -67,61 +67,61 @@ public:
|
||||
*
|
||||
* \return the current state of WifiPhy
|
||||
*/
|
||||
WifiPhy::State GetState (void);
|
||||
WifiPhy::State GetState (void) const;
|
||||
/**
|
||||
* Check whether the current state is CCA busy.
|
||||
*
|
||||
* \return true if the current state is CCA busy, false otherwise
|
||||
*/
|
||||
bool IsStateCcaBusy (void);
|
||||
bool IsStateCcaBusy (void) const;
|
||||
/**
|
||||
* Check whether the current state is IDLE.
|
||||
*
|
||||
* \return true if the current state is IDLE, false otherwise
|
||||
*/
|
||||
bool IsStateIdle (void);
|
||||
bool IsStateIdle (void) const;
|
||||
/**
|
||||
* Check whether the current state is not IDLE.
|
||||
*
|
||||
* \return true if the current state is not IDLE, false otherwise
|
||||
*/
|
||||
bool IsStateBusy (void);
|
||||
bool IsStateBusy (void) const;
|
||||
/**
|
||||
* Check whether the current state is RX.
|
||||
*
|
||||
* \return true if the current state is RX, false otherwise
|
||||
*/
|
||||
bool IsStateRx (void);
|
||||
bool IsStateRx (void) const;
|
||||
/**
|
||||
* Check whether the current state is TX.
|
||||
*
|
||||
* \return true if the current state is TX, false otherwise
|
||||
*/
|
||||
bool IsStateTx (void);
|
||||
bool IsStateTx (void) const;
|
||||
/**
|
||||
* Check whether the current state is SWITCHING.
|
||||
*
|
||||
* \return true if the current state is SWITCHING, false otherwise
|
||||
*/
|
||||
bool IsStateSwitching (void);
|
||||
bool IsStateSwitching (void) const;
|
||||
/**
|
||||
* Check whether the current state is SLEEP.
|
||||
*
|
||||
* \return true if the current state is SLEEP, false otherwise
|
||||
*/
|
||||
bool IsStateSleep (void);
|
||||
bool IsStateSleep (void) const;
|
||||
/**
|
||||
* Return the elapsed time of the current state.
|
||||
*
|
||||
* \return the elapsed time of the current state
|
||||
*/
|
||||
Time GetStateDuration (void);
|
||||
Time GetStateDuration (void) const;
|
||||
/**
|
||||
* Return the time before the state is back to IDLE.
|
||||
*
|
||||
* \return the delay before the state is back to IDLE
|
||||
*/
|
||||
Time GetDelayUntilIdle (void);
|
||||
Time GetDelayUntilIdle (void) const;
|
||||
/**
|
||||
* Return the time the last RX start.
|
||||
*
|
||||
|
||||
@@ -657,7 +657,7 @@ WifiPhy::SetMobility (Ptr<MobilityModel> mobility)
|
||||
}
|
||||
|
||||
Ptr<MobilityModel>
|
||||
WifiPhy::GetMobility (void)
|
||||
WifiPhy::GetMobility (void) const
|
||||
{
|
||||
if (m_mobility != 0)
|
||||
{
|
||||
|
||||
@@ -1399,7 +1399,7 @@ public:
|
||||
*
|
||||
* \return the mobility model this PHY is associated with
|
||||
*/
|
||||
Ptr<MobilityModel> GetMobility (void);
|
||||
Ptr<MobilityModel> GetMobility (void) const;
|
||||
|
||||
/**
|
||||
* \param freq the operating center frequency (MHz) on this node.
|
||||
|
||||
Reference in New Issue
Block a user