pub unsafe extern "C" fn otTrelSetEnabled(
aInstance: *mut otInstance,
aEnable: bool,
)
Expand description
Sets the user’s preference to enable or disable the TREL operation.
The TREL interface’s operational state is determined by two factors: the user’s preference (set by this function) and the OpenThread stack’s internal state. The TREL interface is enabled only when both the user and the OpenThread stack have it enabled. Otherwise, it is disabled.
Upon OpenThread initialization, the user’s preference is set to enabled by default. This allows the stack to control the TREL interface state automatically (e.g., enabling it when radio links are enabled and disabling it when radio links are disabled).
If the user explicitly disables the TREL operation by calling this function with @p aEnable as false
, it will
remain disabled until the user explicitly re-enables it by calling this function with @p aEnable as true
. This
ensures the user’s ‘disable’ request persists across other OpenThread stack state changes (which may trigger
disabling/enabling of all radio links, including the TREL link).
@param[in] aInstance A pointer to an OpenThread instance. @param[in] aEnable A boolean to enable/disable the TREL operation.