diff --git a/CHANGES.md b/CHANGES.md index bb6c9c0a8..844f13173 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -31,8 +31,11 @@ Applications have a new Attribute to set the IPv4 ToS field. * (core) In `TestSuite` class, deprecated `ALL`, `UNIT`, `SYSTEM`, `EXAMPLE` and `PERFORMANCE`. They have been replaced by `Type::ALL`, `Type::UNIT`, `Type::SYSTEM`, `Type::EXAMPLE` and `Type::PERFORMANCE`, respectively. * (wifi) Deprecated `WIFI_TID_TO_LINK_MAPPING_{NOT_SUPPORTED,SAME_LINK_SET,ANY_LINK_SET}`. They have been replaced by `WifiTidToLinkMappingNegSupport::{NOT_SUPPORTED,SAME_LINK_SET,ANY_LINK_SET}`, respectively. * (wifi) Deprecated `{IDLE, CCA_BUSY, TX, RX, SWITCHING, SLEEP, OFF}`. They have been replaced by `WifiPhyState::{IDLE, CCA_BUSY, TX, RX, SWITCHING, SLEEP, OFF}`, respectively. -* `LrWpanMacPibAttributeIdentifier` attribute ids are now standard compliant. -* Multiple new identifiers added to `LrWpanMacPibAttributeIdentifier`. +* (lr-wpan) `LrWpanMacPibAttributeIdentifier` attribute ids are now standard compliant. +* (lr-wpan) Multiple new identifiers added to `LrWpanMacPibAttributeIdentifier`. +* (lr-wpan) Adds standard version comments to `MLME-GET.request` function. +* (lr-wpan) In the MAC layer, renamed `m_selfExt` to the variable `m_macExtendedAddress` to make it consistent with the standard specification. + ### Changes to build system diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 0363ec397..f86497c6f 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -23,6 +23,7 @@ Release 3-dev - (network) !1828 - Added a common helper to create and install applications - (lr-wpan) !1915 - Use MAC and PHY standard attribute ids - (lr-wpan) !1924 - Adds MAC attribute identifiers +- (lr-wpan) !1927 - Adds standard version comments to MLME-GET.request function ### Bugs fixed diff --git a/src/lr-wpan/model/lr-wpan-mac-base.h b/src/lr-wpan/model/lr-wpan-mac-base.h index ed0a42620..e76374225 100644 --- a/src/lr-wpan/model/lr-wpan-mac-base.h +++ b/src/lr-wpan/model/lr-wpan-mac-base.h @@ -279,8 +279,11 @@ enum LrWpanMacPibAttributeIdentifier macMaxCSMABackoff = 0x4e, //!< The maximum number of backoffs the CSMA-CA algorithm //!< will attempt before declaring a channel access failure. macMinBE = 0x4f, //!< The minimum value of the backoff exponent (BE) in the CSMA-CA algorithm. - macExtendedAddress = 3, //!< The extended address of the device (64 bit address)(No compliant). - macPanId = 0x50, //!< The 16-bit identifier of the Personal Area Network (PAN). + macExtendedAddress = 0x6f, //!< The extended address of the device (64 bit address). The id + //!< is not compliant for 2003 and 2006 versions, but this attribute + //!< is later on added to the Pib attributes in 2011 and subsequent + //!< editions of the standard. + macPanId = 0x50, //!< The 16-bit identifier of the Personal Area Network (PAN). macPromiscuousMode = 0x51, //!< Indication of whether the MAC sublayer is in a promiscuous //!< mode. True indicates that the MAC sublayer accepts all frames. macRxOnWhenIdle = 0x52, //!< Indication of whether the MAC is enabled during idle periods. @@ -758,9 +761,11 @@ class LrWpanMacBase : public Object Ptr attribute) = 0; /** - * IEEE 802.15.4-2011, section 6.2.5.1 + * IEEE 802.15.4-2006, section 7.1.6.1 * MLME-GET.request * Request information about a given PIB attribute. + * Note: The PibAttributeIndex parameter is not included because + * attributes that represent tables are not supported. * * \param id the attribute identifier */ diff --git a/src/lr-wpan/model/lr-wpan-mac.cc b/src/lr-wpan/model/lr-wpan-mac.cc index 9740894dc..c169cc031 100644 --- a/src/lr-wpan/model/lr-wpan-mac.cc +++ b/src/lr-wpan/model/lr-wpan-mac.cc @@ -40,7 +40,7 @@ #undef NS_LOG_APPEND_CONTEXT #define NS_LOG_APPEND_CONTEXT \ - std::clog << "[address " << m_shortAddress << " | " << m_selfExt << "] "; + std::clog << "[address " << m_shortAddress << " | " << m_macExtendedAddress << "] "; namespace ns3 { @@ -214,7 +214,7 @@ LrWpanMac::LrWpanMac() m_macCoordShortAddress = Mac16Address("ff:ff"); m_macCoordExtendedAddress = Mac64Address("ff:ff:ff:ff:ff:ff:ff:ed"); m_deviceCapability = DeviceType::FFD; - m_selfExt = Mac64Address::Allocate(); + m_macExtendedAddress = Mac64Address::Allocate(); m_macPromiscuousMode = false; m_macMaxFrameRetries = 3; m_retransmission = 0; @@ -363,7 +363,7 @@ void LrWpanMac::SetExtendedAddress(Mac64Address address) { NS_LOG_FUNCTION(this << address); - m_selfExt = address; + m_macExtendedAddress = address; } Mac16Address @@ -377,7 +377,7 @@ Mac64Address LrWpanMac::GetExtendedAddress() const { NS_LOG_FUNCTION(this); - return m_selfExt; + return m_macExtendedAddress; } void @@ -976,7 +976,7 @@ LrWpanMac::MlmeGetRequest(LrWpanMacPibAttributeIdentifier id) attributes->macShortAddress = m_shortAddress; break; case macExtendedAddress: - attributes->macExtendedAddress = m_selfExt; + attributes->macExtendedAddress = m_macExtendedAddress; break; case macPanId: attributes->macPanId = m_macPanId; @@ -1221,7 +1221,7 @@ LrWpanMac::SendDataRequestCommand() // Mac Header values (Section 5.3.5) macHdr.SetSrcAddrMode(LrWpanMacHeader::EXTADDR); - macHdr.SetSrcAddrFields(0xffff, m_selfExt); + macHdr.SetSrcAddrFields(0xffff, m_macExtendedAddress); if (m_macCoordShortAddress == Mac16Address("ff:fe")) { @@ -1942,7 +1942,7 @@ LrWpanMac::PdDataIndication(uint32_t psduLength, Ptr p, uint8_t lqi) if (acceptFrame && (receivedMacHdr.GetDstAddrMode() == EXT_ADDR)) { - acceptFrame = (receivedMacHdr.GetExtDstAddr() == m_selfExt); + acceptFrame = (receivedMacHdr.GetExtDstAddr() == m_macExtendedAddress); } if (acceptFrame && m_scanEvent.IsRunning()) diff --git a/src/lr-wpan/model/lr-wpan-mac.h b/src/lr-wpan/model/lr-wpan-mac.h index b5ff0aa6e..86521df5d 100644 --- a/src/lr-wpan/model/lr-wpan-mac.h +++ b/src/lr-wpan/model/lr-wpan-mac.h @@ -1167,7 +1167,7 @@ class LrWpanMac : public LrWpanMacBase /** * The extended 64 address (IEEE EUI-64) used by this MAC. */ - Mac64Address m_selfExt; + Mac64Address m_macExtendedAddress; /** * The transmit queue used by the MAC.