mirror of
https://github.com/espressif/openthread.git
synced 2026-10-12 18:57:37 +00:00
[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:
@@ -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();
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user