-
Notifications
You must be signed in to change notification settings - Fork 7.6k
feat(openthread): adds native api #11474
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
Conversation
👋 Hello SuGlider, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
Test Results 76 files 76 suites 12m 45s ⏱️ Results for commit a0e01f4. ♻️ This comment has been updated with latest results. |
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Extends the Arduino OpenThread library by adding a native OThread
API alongside the existing CLI API and updates all examples and build scripts to use the new class.
- Introduces
OThread.begin()
/end()
and prefixes all static API calls withOThread.
- Updates example sketches to call
OThread.begin(...)
beforeOThreadCLI.begin()
- Updates README documentation and CMakeLists to include the new source
Reviewed Changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
libraries/OpenThread/examples/CLI/onReceive/onReceive.ino | Switched from OThreadCLI.begin() to OThread.begin() then CLI |
libraries/OpenThread/examples/CLI/ThreadScan/ThreadScan.ino | Updated API calls to OThread. prefix and copyright |
libraries/OpenThread/examples/CLI/SimpleThreadNetwork/RouterNode/RouterNode.ino | Prefixed API with OThread. and reordered init calls |
libraries/OpenThread/examples/CLI/SimpleThreadNetwork/LeaderNode/LeaderNode.ino | Prefixed API with OThread. and reordered init calls |
libraries/OpenThread/examples/CLI/SimpleThreadNetwork/ExtendedRouterNode/ExtendedRouterNode.ino | Prefixed API with OThread. and reordered init calls |
libraries/OpenThread/examples/CLI/SimpleNode/SimpleNode.ino | Prefixed API with OThread. and reordered init calls |
libraries/OpenThread/examples/CLI/SimpleCLI/SimpleCLI.ino | Prefixed API with OThread. and reordered init calls |
libraries/OpenThread/examples/CLI/COAP/coap_switch/coap_switch.ino | Prefixed API with OThread. and reordered init calls |
libraries/OpenThread/examples/CLI/COAP/coap_lamp/coap_lamp.ino | Prefixed API with OThread. and reordered init calls |
libraries/OpenThread/README.md | Added native API docs, updated classes and methods |
CMakeLists.txt | Added OThread.cpp to OpenThread library sources |
Comments suppressed due to low confidence (4)
libraries/OpenThread/examples/CLI/ThreadScan/ThreadScan.ino:30
- [nitpick] The inline comment still refers to CLI auto-start behavior; update it to clarify that the
true
argument now applies toOThread.begin
.
OThread.begin(true); // For scanning, AutoStart must be active, any setup
libraries/OpenThread/README.md:239
- [nitpick] This method description is duplicated under Console Management; consider consolidating to avoid confusion about which
begin
applies to CLI versus native API.
-- `begin(bool OThreadAutoStart = true)`: Initializes the OpenThread stack (optional auto-start).
libraries/OpenThread/README.md:165
- The heading uses inline asterisks instead of a markdown heading; consider changing to
## Notes
for consistency with other sections.
** Notes
CMakeLists.txt:168
- If
DataSet
has its own.cpp
implementation, it should also be added to theARDUINO_LIBRARY_OpenThread_SRCS
list to ensure it’s compiled.
libraries/OpenThread/src/OThread.cpp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description of Change
Extends Arduino OpenThread Library to implement Native API.
For more details, please read the new README.md file and provided library examples.
Tests scenarios
Using C6 and H2 with the provided CLI and Native examples
Related links
None