Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Interference_Simple StrCommandHandler_Demo
Diff: StrCommandHandler.h
- Revision:
- 4:59a5e39e3e91
- Parent:
- 3:049a5f083f32
diff -r 049a5f083f32 -r 59a5e39e3e91 StrCommandHandler.h
--- a/StrCommandHandler.h Wed Nov 27 23:11:11 2019 +0000
+++ b/StrCommandHandler.h Mon Aug 10 10:35:29 2020 +0000
@@ -17,12 +17,12 @@
/** Maps strings and functions
*
- * This maps strings(commands) and functions receiving no arguments,
+ * This maps strings(commands) and functions receiving own command,
* returning something of pointer.
*/
void map(
const char * const arg_command,
- void * (*arg_pfunc)(void)
+ void * (*arg_pfunc)(const char * const)
);
/** Analyzes a command input and executs a function corresponding to it.
@@ -54,16 +54,17 @@
private:
/** Array of commands' name
*
- * The length should be within 15 without last '\0'
+ * The length should be within 15 without last '\0'
+ * The number of the array is (int)m_numofcommands
*/
char (*m_command_name)[16];
/** Array of pointers to functions
- *
- * The length should be within 15 without last '\0'
+ *
+ * The number of the array is (int)m_numofcommands
*/
- void * (**m_function)(void);
-
+ void * (**m_function)(const char * const);
+
/** Numbers of commands registered in this.
*
* If commands are registered over this value,