Simple embedded shell with runtime pluggable commands.

Dependents:   DataBus2018

Implements a simple unix-like shell for embedded systems with a pluggable command architecture.

SimpleShell.h

Committer:
shimniok
Date:
2018-12-01
Revision:
0:49820d5a38c9
Child:
1:998a7ed04f10

File content as of revision 0:49820d5a38c9:

#include "mbed.h"

class SimpleShell {
public:  
    SimpleShell();

    void attach(Callback<void()> func, char *command) {
    }
    
//    void registerCommand(char *commandString, char *helpText, Callback<void(float)> cb);
    void run();
    
private:
    static const int MAXBUF=128;
    void printPrompt(void);
    void readCommand();
    char cmd[MAXBUF];
    char _cwd[MAXBUF];
}; // class