-
Hello, first thanks for developing this nice feature and i am interested in using it as a front end to feed commands to an Arduino MCU. The question I have would be on how to create something like a 'send' command which takes a variable number of arguments depending on the command to send to the MCU. In fact the MCU understands ( quite cryptic but for the users that make sense :) ) commands in the form of On the cli -> send over the wire ( Serial and/or Ethernet ) to the MCU I don't need the types of the parameters they can all be strings no issue as they will be interpreted on the MCU as needed. Is there a way of doing this today, which i didn't see yet or maybe an improvement to add variadic parameters in the menu construction ? Thanks a lot |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @grbba . First of all, thank you for using the CLI library and contributing to the community with your good question. Please add a star to the project and -- if you feel really generous -- you can consider becoming a sponsor by clicking the heart button on top of the page :-) I moved your question to "GitHub discussions" because it's more appropriate here. Currently, the library allows adding a command with a variable number of
So, in your case, you could have something like this:
However, maybe your design could be improved. It depends on the context of your application. |
Beta Was this translation helpful? Give feedback.
Hi @grbba .
First of all, thank you for using the CLI library and contributing to the community with your good question. Please add a star to the project and -- if you feel really generous -- you can consider becoming a sponsor by clicking the heart button on top of the page :-)
I moved your question to "GitHub discussions" because it's more appropriate here.
Currently, the library allows adding a command with a variable number of
std::string
parameters. You can see it in thecomplete
example that comes with the library: