Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[thread-host] add ThreadEnabled state callback #2612

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

Irving-cl
Copy link
Contributor

This PR adds AddThreadEnabledStateChangedCallback to ThreadHost and implements it for RcpHost.

Since the ThreadEnabledState is subscribed by some platform services, (for example, on Android) and this state is also required to implement Join, Leave, ScheduleMigration and SetThreadEnabled, this PR adds the ThreadEnabledState to RcpHost and provide an API to allow other components to subscribe to this state.

This PR makes the behavior of ScheduleMigration and SetThreadEnabled same as the Android binder API. And the unit test is updated accordingly.

@Irving-cl Irving-cl requested a review from sunytt November 20, 2024 08:48
@Irving-cl Irving-cl force-pushed the thread_host_add_enabled_state branch 2 times, most recently from 2f979ad to 5e96e8e Compare November 20, 2024 09:25
@Irving-cl Irving-cl force-pushed the thread_host_add_enabled_state branch from 5e96e8e to 65f0fb3 Compare November 20, 2024 09:42
@Irving-cl Irving-cl requested a review from sunytt November 20, 2024 09:47
Copy link
Contributor

@sunytt sunytt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@Irving-cl Irving-cl requested a review from jwhui November 21, 2024 01:45
@jwhui jwhui changed the title [thread host] add ThreadEnabled state callback [thread-host] add ThreadEnabled state callback Nov 21, 2024
@jwhui jwhui merged commit fe769eb into openthread:main Nov 21, 2024
32 checks passed
@Irving-cl Irving-cl deleted the thread_host_add_enabled_state branch December 5, 2024 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants