lr-wpan: Add LQI to MlmeAssociateIndicationParams
This commit is contained in:
@@ -24,7 +24,8 @@ Changes from ns-3.39 to ns-3-dev
|
||||
* (energy) Support for battery presets and cell packs.
|
||||
* (energy) Documentation was updated and reformatted.
|
||||
* (lr-wpan) Removed unnecessary bcst filter from `LrWpanMac::PdDataIndication` which also blocked the correct reception of beacon request commands.
|
||||
* (lr-wpan) Add the functions to set or get the capability field via bitmap (a 8 bit int).
|
||||
* (lr-wpan) Added the functions to set or get the capability field via bitmap (a 8 bit int).
|
||||
* (lr-wpan) Added the possibility to obtain the LQI from a received `MlmeAssociateIndicationParams`.
|
||||
|
||||
### Changes to build system
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ requirements (Note: not all ns-3 features are available on all systems):
|
||||
- (wifi) Added support for 802.11be TID-to-Link Mapping
|
||||
- (energy) - !1329 - Extensions to battery discharge module
|
||||
- (lr-wpan) - !1604 - Add CapabilityField bitmap functions
|
||||
- (lr-wpan) - !1645 - Add LQI to MlmeAssociateIndicationParams
|
||||
|
||||
### Bugs fixed
|
||||
|
||||
|
||||
@@ -183,6 +183,7 @@ LrWpanMac::LrWpanMac()
|
||||
m_numCsmacaRetry = 0;
|
||||
m_txPkt = nullptr;
|
||||
m_rxPkt = nullptr;
|
||||
m_lastRxFrameLqi = 0;
|
||||
m_ifs = 0;
|
||||
|
||||
m_macLIFSPeriod = 40;
|
||||
@@ -2093,9 +2094,10 @@ LrWpanMac::PdDataIndication(uint32_t psduLength, Ptr<Packet> p, uint8_t lqi)
|
||||
m_setMacState.Cancel();
|
||||
ChangeMacState(MAC_IDLE);
|
||||
|
||||
// save received packet to process the appropriate indication/response after
|
||||
// sending ACK (PD-DATA.confirm)
|
||||
// save received packet and LQI to process the appropriate indication/response
|
||||
// after sending ACK (PD-DATA.confirm)
|
||||
m_rxPkt = originalPkt->Copy();
|
||||
m_lastRxFrameLqi = lqi;
|
||||
|
||||
// LOG Commands with ACK required.
|
||||
CommandPayloadHeader receivedMacPayload;
|
||||
@@ -3176,9 +3178,13 @@ LrWpanMac::PdDataConfirm(LrWpanPhyEnumeration status)
|
||||
{
|
||||
if (!m_mlmeAssociateIndicationCallback.IsNull())
|
||||
{
|
||||
// NOTE: The LQI parameter is not part of the standard but found
|
||||
// in some implementations as is required for higher layers (See Zboss
|
||||
// implementation).
|
||||
MlmeAssociateIndicationParams associateParams;
|
||||
associateParams.capabilityInfo = receivedMacPayload.GetCapabilityField();
|
||||
associateParams.m_extDevAddr = receivedMacHdr.GetExtSrcAddr();
|
||||
associateParams.lqi = m_lastRxFrameLqi;
|
||||
m_mlmeAssociateIndicationCallback(associateParams);
|
||||
}
|
||||
|
||||
|
||||
@@ -447,9 +447,11 @@ struct McpsDataIndicationParams
|
||||
*/
|
||||
struct MlmeAssociateIndicationParams
|
||||
{
|
||||
Mac64Address m_extDevAddr; //!< The extended address of the device requesting association
|
||||
CapabilityField
|
||||
capabilityInfo; //!< The operational capabilities of the device requesting association.
|
||||
Mac64Address m_extDevAddr; //!< The extended address of the device requesting association
|
||||
CapabilityField capabilityInfo; //!< The operational capabilities of
|
||||
//!< the device requesting association.
|
||||
u_int8_t lqi{0}; //!< The link quality indicator of the received associate request command
|
||||
//!< (Not officially supported in the standard but found in implementations)
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -2218,6 +2220,11 @@ class LrWpanMac : public Object
|
||||
*/
|
||||
uint8_t m_numCsmacaRetry;
|
||||
|
||||
/**
|
||||
* Keep track of the last received frame Link Quality Indicator
|
||||
*/
|
||||
uint8_t m_lastRxFrameLqi;
|
||||
|
||||
/**
|
||||
* Scheduler event for the ACK timeout of the currently transmitted data
|
||||
* packet.
|
||||
|
||||
Reference in New Issue
Block a user