From 5d1ec8108d605eaf3827bdced5641cc8a146d4e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Wed, 23 May 2018 22:35:21 +0200 Subject: [PATCH] wifi: Aifsn type should be uint8_t In Txop --- src/wifi/model/txop.cc | 8 ++++---- src/wifi/model/txop.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/wifi/model/txop.cc b/src/wifi/model/txop.cc index 924562de3..df246eabb 100644 --- a/src/wifi/model/txop.cc +++ b/src/wifi/model/txop.cc @@ -59,7 +59,7 @@ Txop::GetTypeId (void) UintegerValue (2), MakeUintegerAccessor (&Txop::SetAifsn, &Txop::GetAifsn), - MakeUintegerChecker ()) + MakeUintegerChecker ()) .AddAttribute ("TxopLimit", "The TXOP limit: the default value conforms to non-QoS.", TimeValue (MilliSeconds (0)), MakeTimeAccessor (&Txop::SetTxopLimit, @@ -253,9 +253,9 @@ Txop::StartBackoffNow (uint32_t nSlots) } void -Txop::SetAifsn (uint32_t aifsn) +Txop::SetAifsn (uint8_t aifsn) { - NS_LOG_FUNCTION (this << aifsn); + NS_LOG_FUNCTION (this << +aifsn); m_aifsn = aifsn; } @@ -279,7 +279,7 @@ Txop::GetMaxCw (void) const return m_cwMax; } -uint32_t +uint8_t Txop::GetAifsn (void) const { return m_aifsn; diff --git a/src/wifi/model/txop.h b/src/wifi/model/txop.h index b21db2f34..66368b82f 100644 --- a/src/wifi/model/txop.h +++ b/src/wifi/model/txop.h @@ -173,7 +173,7 @@ public: * * \param aifsn the number of slots that make up an AIFS. */ - void SetAifsn (uint32_t aifsn); + void SetAifsn (uint8_t aifsn); /** * Set the TXOP limit. * @@ -198,7 +198,7 @@ public: * * \return the number of slots that make up an AIFS. */ - uint32_t GetAifsn (void) const; + uint8_t GetAifsn (void) const; /** * Return the TXOP limit. * @@ -515,7 +515,7 @@ protected: */ Time m_backoffStart; - uint32_t m_aifsn; //!< the AIFSN + uint8_t m_aifsn; //!< the AIFSN Time m_txopLimit; //!< the txop limit time Ptr m_currentPacket; //!< the current packet