pub unsafe extern "C" fn otPlatRadioCancelScheduledTx(
aInstance: *mut otInstance,
) -> otErrorExpand description
Cancel a previously scheduled transmission.
This API requires the radio platform to support the OT_RADIO_CAPS_SCHEDULED_TX capability.
- If there is no pending scheduled transmission (e.g., none was scheduled, or a previous schedule was already
canceled or completed), calling this function MUST take no action and return
OT_ERROR_NONE. - If a scheduled transmission is pending and can still be aborted before transmission starts on the air, the radio
platform MUST cancel it, release ownership of the scheduled TX frame buffer (
otPlatRadioGetScheduledTxFrame()) back to the OpenThread stack, and returnOT_ERROR_NONE. The radio platform MUST NOT invokeotPlatRadioScheduledTxDone()for a canceled transmission. - When
otPlatRadioCancelScheduledTx()returnsOT_ERROR_NONE, the OpenThread stack immediately reclaims ownership of the scheduled TX frame buffer and may immediately prepare a new frame in that buffer and callotPlatRadioScheduleTx()to schedule a new transmission. - If the radio platform cannot cancel the scheduled transmission (for example, because the transmission has already
started and is currently in progress on the air or waiting for an acknowledgment, or because an
OT_ERROR_ABORTcompletion is already queued to be reported), it MUST returnOT_ERROR_BUSY. In this case:- The scheduled transmission is NOT canceled, and the radio platform retains ownership of the scheduled TX frame buffer.
- The radio platform MUST subsequently report the outcome of the transmission via the
otPlatRadioScheduledTxDone()callback. - The OpenThread stack will wait until
otPlatRadioScheduledTxDone()is invoked before modifying the scheduled TX frame buffer or scheduling a new transmission.
- Note that if a deferred
OT_ERROR_ABORTcallback is pending (e.g., due to a past/missed target time or Coex denial), the radio platform MAY handleotPlatRadioCancelScheduledTx()in whichever way it prefers: it may either cancel the pending callback and returnOT_ERROR_NONE, or returnOT_ERROR_BUSYand let theotPlatRadioScheduledTxDone()callback be invoked.
@param[in] aInstance The OpenThread instance structure.
@retval OT_ERROR_NONE Successfully canceled the scheduled transmission (or no scheduled transmission was pending). @retval OT_ERROR_BUSY The scheduled transmission has already started and could not be canceled.