This class can map strings(commands) and functions receiving no arguments returning an int value.

Dependents:   Interference_Simple StrCommandHandler_Demo

Revision:
4:59a5e39e3e91
Parent:
3:049a5f083f32
--- 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,