pub unsafe extern "C" fn otChannelManagerRequestChannelSelect(
aInstance: *mut otInstance,
aSkipQualityCheck: bool,
) -> otError
Expand description
Requests that ChannelManager
checks and selects a new channel and starts a channel change.
Unlike the otChannelManagerRequestChannelChange()
where the channel must be given as a parameter, this function
asks the ChannelManager
to select a channel by itself (based on collected channel quality info).
Once called, the Channel Manager will perform the following 3 steps:
-
ChannelManager
decides if the channel change would be helpful. This check can be skipped ifaSkipQualityCheck
is set to true (forcing a channel selection to happen and skipping the quality check). This step uses the collected link quality metrics on the device (such as CCA failure rate, frame and message error rates per neighbor, etc.) to determine if the current channel quality is at the level that justifies a channel change. -
If the first step passes, then
ChannelManager
selects a potentially better channel. It uses the collected channel quality data byChannelMonitor
module. The supported and favored channels are used at this step. (seeotChannelManagerSetSupportedChannels()
andotChannelManagerSetFavoredChannels()
). -
If the newly selected channel is different from the current channel,
ChannelManager
requests/starts the channel change process (internally invoking aRequestChannelChange()
).
@param[in] aInstance A pointer to an OpenThread instance. @param[in] aSkipQualityCheck Indicates whether the quality check (step 1) should be skipped.
@retval OT_ERROR_NONE Channel selection finished successfully. @retval OT_ERROR_NOT_FOUND Supported channel mask is empty, therefore could not select a channel.