-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Mesh API: Get and validate functions for PHY mode and channel plan IDs #14251
Conversation
@JarkkoPaso, thank you for your changes. |
|
||
mesh_error_t WisunInterface::validate_network_phy_mode_and_channel_plan_id(uint8_t phy_mode_id, uint8_t channel_plan_id) | ||
{ | ||
int status = ws_management_phy_mode_id_validate(get_interface_id(), phy_mode_id); |
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.
Did we make separate validates for mode and plan id. this sounds problematic as there is probably some mode, plan combinations we don't support.
supported
mode1,plan1
mode2,plan1
mode2,plan2
but not supported
mode2,plan2
we can't set or validate this proberly do we need to change the underlying API?
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.
I see your point. Yes, the validation on Nanostack API is separated. We can keep this PR on hold and I can change the Nanostack API.
18559ff
to
a095b72
Compare
|
||
mesh_error_t WisunInterface::validate_network_domain_configuration(uint8_t regulatory_domain, uint8_t phy_mode_id, uint8_t channel_plan_id) | ||
{ | ||
int status = ws_management_domain_configuration_validate(get_interface_id(), regulatory_domain, phy_mode_id, channel_plan_id); | ||
if (status != 0) { | ||
return MESH_ERROR_UNKNOWN; |
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.
we not have a better error than unknot available?
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.
Actually we have these error types in mesh API:
MESH_ERROR_NONE
MESH_ERROR_UNKNOWN
MESH_ERROR_MEMORY
MESH_ERROR_STATE
MESH_ERROR_PARAM
But Nanostack API documentation (Doxygen) doesn't tell the reason for error. It only says: "return <0 Fail" for every WS management function.
We should probably first check that error values are correctly set and documented in Nanostack API.
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.
MESH_ERROR_PARAM may be good select for indicate proper information
This pull request has automatically been marked as stale because it has had no recent activity. @JarkkoPaso, please carry out any necessary work to get the changes merged. Thank you for your contributions. |
a095b72
to
df08498
Compare
Pull request has been modified.
Test run: FAILEDSummary: 1 of 10 test jobs failed Failed test jobs:
|
Test run: SUCCESSSummary: 10 of 10 test jobs passed |
Summary of changes
Implemented domain configuration functions in mesh API:
Note! This change requires new Nanostack version: #14327
Impact of changes
None
Migration actions required
None
Documentation
None
Pull request type
Test results
Reviewers
@mikter @mikaleppanen @artokin @juhhei01