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 ThreadHost Error code #2633

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Irving-cl
Copy link
Contributor

This PR adds ThreadHost error code and use it as part of the ThreadHost API.

Following openthread/openthread#10990, currently otErrors are used in ThreadHost APIs. But some specific errors in ThreadHost APIs cannot be denoted by otError and these errors do need to be differentiated by the client code. For example, kErrorThreadDisabled means some action is taken when Thread is 'Disabled' while 'Thread Disabled' is a concept for ThreadHost APIs and beyond the scope of openthread.

This PR adds ThreadHost error code which is a superset of otErrors and contains a few proprietary errors that could be used to represent some specific cases.

This PR also replaces the existing usage of otError in the client code of ThreadHost APIs.

@Irving-cl Irving-cl force-pushed the thread_host_error_code branch from 663c03a to 651fa7b Compare December 5, 2024 12:45
@Irving-cl Irving-cl marked this pull request as ready for review December 5, 2024 12:45
Copy link

codecov bot commented Dec 5, 2024

Codecov Report

Attention: Patch coverage is 61.17647% with 33 lines in your changes missing coverage. Please review.

Project coverage is 45.86%. Comparing base (2b41187) to head (651fa7b).
Report is 891 commits behind head on main.

Files with missing lines Patch % Lines
tests/gtest/test_rcp_host_api.cpp 69.44% 22 Missing ⚠️
src/dbus/server/dbus_thread_object_ncp.cpp 0.00% 10 Missing ⚠️
src/ncp/rcp_host.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2633      +/-   ##
==========================================
- Coverage   55.77%   45.86%   -9.92%     
==========================================
  Files          87      106      +19     
  Lines        6890    12855    +5965     
  Branches        0      929     +929     
==========================================
+ Hits         3843     5896    +2053     
- Misses       3047     6636    +3589     
- Partials        0      323     +323     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@abtink abtink left a comment

Choose a reason for hiding this comment

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

Thanks. LGTM 👍

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.

2 participants