Skip to content

Sync mbed-client-cli files with v0.4.0 #8677

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

Merged
merged 1 commit into from
Nov 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions features/frameworks/mbed-client-cli/mbed-client-cli/ns_cmdline.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ uint8_t cmd_history_size(uint8_t max);
* \param fmt console print function (like printf)
*/
#if defined(__GNUC__) || defined(__CC_ARM)
void cmd_printf(const char *fmt, ...) __attribute__ ((__format__(__printf__, 1, 2)));
void cmd_printf(const char *fmt, ...) __attribute__((__format__(__printf__, 1, 2)));
#else
void cmd_printf(const char *fmt, ...);
#endif
Expand All @@ -139,7 +139,7 @@ void cmd_printf(const char *fmt, ...);
* \param ap list of parameters needed by format string. This must correspond properly with the conversion specifier.
*/
#if defined(__GNUC__) || defined(__CC_ARM)
void cmd_vprintf(const char *fmt, va_list ap) __attribute__ ((__format__(__printf__, 1, 0)));
void cmd_vprintf(const char *fmt, va_list ap) __attribute__((__format__(__printf__, 1, 0)));
#else
void cmd_vprintf(const char *fmt, va_list ap);
#endif
Expand Down Expand Up @@ -273,6 +273,26 @@ void cmd_alias_add(const char *alias, const char *value);
* \param value Value for variable. Values can contains white spaces and '"' or '"' characters.
*/
void cmd_variable_add(char *variable, char *value);
/**
* Add integer variable to interpreter.
* Variables are replaced with values before executing a command.
* \code
cmd_variable_add_int("world", 2);
cmd_exe("echo $world"); // this is now same as 'echo 2' .
* \endcode
* \param variable Variable name, which will be replaced in interpreter.
* \param value Value for variable

*/
void cmd_variable_add_int(char *variable, int value);
/**
* Request screen size from host
* Response are stored to variables:
* COLUMNS and LINES - as integer values.
* Note: Require terminal that handle request codes, like screen.
*/
void cmd_request_screen_size(void);


/** find command parameter index by key.
* e.g.
Expand Down
Loading