Skip to content

Commit

Permalink
lr-wpan: Adds attributes to MLME-GET.request
Browse files Browse the repository at this point in the history
  • Loading branch information
Alberto Gallegos Ramonet committed Oct 29, 2023
1 parent 5cc21ee commit ef212ce
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/lr-wpan/model/lr-wpan-mac.cc
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,12 @@ LrWpanMac::MlmeGetRequest(LrWpanMacPibAttributeIdentifier id)
case macPanId:
attributes->macPanId = m_macPanId;
break;
case pCurrentChannel:
attributes->pCurrentChannel = m_phy->GetCurrentChannelNum();
break;
case pCurrentPage:
attributes->pCurrentPage = m_phy->GetCurrentPage();
break;
default:
status = MLMEGET_UNSUPPORTED_ATTRIBUTE;
break;
Expand Down
6 changes: 5 additions & 1 deletion src/lr-wpan/model/lr-wpan-mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,8 @@ enum LrWpanMacPibAttributeIdentifier
macShortAddress = 2,
macExtendedAddress = 3,
macPanId = 4,
pCurrentChannel = 100,
pCurrentPage = 101,
unsupported = 255
// TODO: complete other MAC pib attributes
};
Expand All @@ -363,7 +365,9 @@ struct LrWpanMacPibAttributes : public SimpleRefCount<LrWpanMacPibAttributes>
uint8_t macBeaconPayloadLength{0}; //!< The length in octets of the beacon payload.
Mac16Address macShortAddress; //!< The 16 bit mac short address
Mac64Address macExtendedAddress; //!< The EUI-64 bit address
uint16_t macPanId; //!< The identifier of the PAN
uint16_t macPanId{0xffff}; //!< The identifier of the PAN
uint8_t pCurrentChannel{11}; //!< The current logical channel in used in the PHY
uint8_t pCurrentPage{0}; //!< The current logical page in use in the PHY
// TODO: complete other MAC pib attributes
};

Expand Down

0 comments on commit ef212ce

Please sign in to comment.