openthread_sys

Function otSetStateChangedCallback

Source
pub unsafe extern "C" fn otSetStateChangedCallback(
    aInstance: *mut otInstance,
    aCallback: otStateChangedCallback,
    aContext: *mut c_void,
) -> otError
Expand description

Registers a callback to indicate when certain configuration or state changes within OpenThread.

@param[in] aInstance A pointer to an OpenThread instance. @param[in] aCallback A pointer to a function that is called with certain configuration or state changes. @param[in] aContext A pointer to application-specific context.

@retval OT_ERROR_NONE Added the callback to the list of callbacks. @retval OT_ERROR_ALREADY The callback was already registered. @retval OT_ERROR_NO_BUFS Could not add the callback due to resource constraints.