[mac] update "out of band tx" to check current operation state (#3461)

This commit changes the `SendOutOfBandFrameRequest()` implementation
to check `mOperation` and `mPending<>` state variables to determine
if MAC layer is still busy with a previous OOB tx request (instead of
using the `mOobFrame` pointer variable). This change makes the OOB tx
implementation behave similarly to other APIs (e.g., `ActiveScan()`
or `SendFrameRequest()`). This commit also enhances the documentation
for the OOB Send APIs in header files.
This commit is contained in:
Abtin Keshavarzian
2019-01-24 13:56:19 -08:00
committed by Jonathan Hui
parent b431bc34ce
commit 0ac326ea57
3 changed files with 10 additions and 5 deletions
+6 -2
View File
@@ -279,11 +279,15 @@ OTAPI bool OTCALL otLinkIsInTransmitState(otInstance *aInstance);
/**
* This function enqueues an IEEE 802.15.4 out of band Frame for transmission.
*
* An Out of Band frame is one that was generated outside of OpenThread.
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aOobFrame A pointer to the frame to transmit.
*
* @retval OT_ERROR_NONE Successfully enqueued an IEEE 802.15.4 Data Request message.
* @retval OT_ERROR_ALREADY An IEEE 802.15.4 out of band frame is already enqueued.
* @retval OT_ERROR_NONE Successfully scheduled the frame transmission.
* @retval OT_ERROR_ALREADY MAC layer is busy sending a previously requested frame.
* @retval OT_ERROR_INVALID_STATE The MAC layer is not enabled.
* @retval OT_ERROR_INVALID_ARGS The argument @p aOobFrame is NULL.
*
*/
OTAPI otError OTCALL otLinkOutOfBandTransmitRequest(otInstance *aInstance, otRadioFrame *aOobFrame);