[mac] add enhanced frame pending (#4334)

This commit adds enhanced frame pending feature of Thread 1.2. This
requires the platform radio driver to correctly set frame pending bit
for Data frames and MAC Data Request frames.
This commit is contained in:
Yakun Xu
2020-03-09 09:08:46 -07:00
committed by GitHub
parent fdcb8553b1
commit 56d0e7212b
14 changed files with 201 additions and 30 deletions
+5
View File
@@ -72,6 +72,11 @@ bool otMacFrameIsAck(const otRadioFrame *aFrame)
return static_cast<const Mac::Frame *>(aFrame)->GetType() == Mac::Frame::kFcfFrameAck;
}
bool otMacFrameIsData(const otRadioFrame *aFrame)
{
return static_cast<const Mac::Frame *>(aFrame)->GetType() == Mac::Frame::kFcfFrameData;
}
bool otMacFrameIsDataRequest(const otRadioFrame *aFrame)
{
return static_cast<const Mac::Frame *>(aFrame)->IsDataRequestCommand();
+11
View File
@@ -79,6 +79,17 @@ typedef struct otMacAddress
*/
bool otMacFrameIsAck(const otRadioFrame *aFrame);
/**
* Check if @p aFrame is a Data frame.
*
* @param[in] aFrame A pointer to the frame.
*
* @retval true It is a Data frame.
* @retval false It is not a Data frame.
*
*/
bool otMacFrameIsData(const otRadioFrame *aFrame);
/**
* Check if @p aFrame is an Data Request Command.
*