library to modify and read program variable in runtime from a serial console. You can reset as well the mbed from the console without pushing buttons. Handy for debugging from the online compiler as you can change the behavior of the program without need to recompile each time.

Revision:
2:a59207652720
Parent:
0:85afbf3c9fad
Child:
3:cf43e6de918e
--- a/VarStore.h	Mon Aug 25 09:17:32 2014 +0000
+++ b/VarStore.h	Mon Aug 25 10:45:03 2014 +0000
@@ -10,68 +10,81 @@
 class VarStore
 {
 public:
-/*******************************
-*
-*Constructor
-********************************/
+    /*******************************
+    *
+    *Constructor
+    ********************************/
 
     VarStore(Serial *ser);
-/*******************************
-*
-*Destructor
-********************************/
+    /*******************************
+    *
+    *Destructor
+    ********************************/
 
     virtual ~VarStore();
-/*******************************
-*
-*asigna valor a una variable/array o retorna ERR
-********************************/
+    /*******************************
+    *
+    *asigna valor a una variable/array o retorna ERR
+    ********************************/
 
-    int Set(char *Input);
+    char * Set(char *Input);
 
-/*******************************
-* 
-*devuelve en un string el contenido de una variable
-********************************/
+    /*******************************
+    *
+    *devuelve en un string el contenido de una variable
+    ********************************/
 
     char*  Get(char *Name);
 
-/*******************************
-*carga en el store una variable
-*
-********************************/
+    /*******************************
+    *carga en el store una variable
+    *
+    ********************************/
 
     int Load(char *Name, void *VarPtr,VarTypes VarType );
-    
-/*******************************
-*
-*carga en el store una variable/array
-********************************/
+
+    /*******************************
+    *
+    *carga en el store una variable/array
+    ********************************/
 
     int Load(char *Name, void *VarPtr,VarTypes VarType, int Size );
 
-/*******************************
-* Proceso que less del un serial para modificar
-* los valores de las variables.
-*
-********************************/
+    /*******************************
+    * Proceso que less del un serial para modificar
+    * los valores de las variables.
+    *
+    ********************************/
 
-static    void Worker(void const *args);
+    static    void Worker(void const *args);
+
 
 
 protected:
+
 private:
-/*******************************
-* Busca una variable con nombre name.
-*
-********************************/
+    /*******************************
+    * Busca una variable con nombre name.
+    *
+    ********************************/
 
     VarItem *GetVar(char *name);
 
+    /*******************************
+    * Llamado por worker para
+    * llevar a cabo la acción
+    *
+    ********************************/
+    char  *Do(char *str, VarStore *MyThis);
+    /*******************************
+    *
+    *
+    ********************************/
     VarItem Store[SZ];
     int VarCounter;
     Serial *pc;
 
+
 };
 
 #endif // VARSTORE_H