-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Shell: String to numeric conversion utils #44021
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
Shell: String to numeric conversion utils #44021
Conversation
|
For any questions regarding if this belongs here on basis of its generic nature, ref: #43289 |
5ee7838 to
f324586
Compare
|
@alwa-nordic I know that you argued that this should not be moved back here, but I have spent way more time than intended for this task, and the discussion in the original PR does not seem to give a finite solution any time soon. It is a blocker for other tasks that are important for the Mesh team and it has to move forward now. I have cleared this with @carlescufi. |
jhedberg
left a comment
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 really don’t think it makes sense to introduce such generic functionality in a mesh shell-only context. If necessary (to make progress introducing this as a generic API) we can discuss this in some appropriate Zephyr project meeting (like the API one).
f324586 to
b9c3afa
Compare
Well @jhedberg that would be great. All I know at this point is that this PR is evaluated as to generic to reside in mesh or shell module, while simoutaniously not qualifying as a legit contribution to the general libraries in zephyr, ref: #43289. So I'm not quite sure what to do whit this at this point. Is there anything that you can see which I can do to progress this so that I actually can start utilizing thisfunctionality? I currently do not have the time required to start from scratch on a generic library addition (e.g. sscanf). |
b9c3afa to
fdc0e3a
Compare
fdc0e3a to
ecbe4a4
Compare
|
@jakub-uC the helpers presented in this PR are not in any way Mesh specific. Would it be possible to move them as part of the shell subsystem, so that any shell module can use them? |
subsys/bluetooth/mesh/shell.c
Outdated
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.
Please move these 3 functions to subsys/shell/shell_util.c, that way other shell users can reuse them.
4bf6450 to
478188e
Compare
|
You need to split the shell subsystem changes into a separate commit. Otherwise looks fine. |
Adds string to numeric conversion utility for shell. Signed-off-by: Anders Storrø <[email protected]>
Changes parsing of input string args to provide error checking. This is to prevent unintentional command execution on garbage input strings. Signed-off-by: Anders Storrø <[email protected]>
478188e to
a66f786
Compare
Adds string to numeric conversion utility for shell.
Applies these functions to the Bluetooth Mesh Shell module.
Signed-off-by: Anders Storrø [email protected]