muwerk Serial Console Class  
 More...
#include <console.h>
muwerk Serial Console Class 
 
◆ SerialConsole()
  
  
      
        
          | ustd::SerialConsole::SerialConsole  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ begin() [1/2]
  
  
      
        
          | void ustd::SerialConsole::begin  | 
          ( | 
          Scheduler *  | 
          _pSched,  | 
         
        
           | 
           | 
          Stream *  | 
          pSerial,  | 
         
        
           | 
           | 
          String  | 
          initialCommand = "",  | 
         
        
           | 
           | 
          unsigned long  | 
          pollRate = 60  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Starts the console using the specified serial interface
The specified serial interface must be intiialized and configured (baudrate, etc.) before starting the serial console.
- Parameters
 - 
  
    | _pSched | Pointer to the muwerk scheduler.  | 
    | pSerial | Pointer to the serial interface to use  | 
    | initialCommand | (optional, default none) Initial command to execute.  | 
    | pollRate | (optional, default 60 msec) Pollrate in milliseconds of the serial interface | 
  
   
 
 
◆ begin() [2/2]
  
  
      
        
          | void ustd::SerialConsole::begin  | 
          ( | 
          Scheduler *  | 
          _pSched,  | 
         
        
           | 
           | 
          String  | 
          initialCommand = "",  | 
         
        
           | 
           | 
          unsigned long  | 
          pollRate = 60  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Starts the console on the default serial interface
The serial interface Serial must be intiialized and configured (baudrate, etc.) before starting the serial console.
- Parameters
 - 
  
    | _pSched | Pointer to the muwerk scheduler.  | 
    | initialCommand | (optional, default none) Initial command to execute.  | 
    | pollRate | (optional, default 60 msec) Pollrate in milliseconds of the serial interface | 
  
   
 
 
◆ execute()
  
  
      
        
          | bool ustd::Console::execute  | 
          ( | 
          String  | 
          command | ) | 
           | 
         
       
   | 
  
inlineinherited   | 
  
 
Executes the given command 
- Parameters
 - 
  
    | command | The command to execute  | 
  
   
- Returns
 true if something happened (also if the commad is invalid)
 
 
◆ extend()
  
  
      
        
          | int ustd::Console::extend  | 
          ( | 
          String  | 
          command,  | 
         
        
           | 
           | 
          T_COMMANDFN  | 
          handler  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlineinherited   | 
  
 
Extend the console with a custom command
- Parameters
 - 
  
    | command | The name of the command  | 
    | handler | Callback of type void myCallback(String command, String
args) that is called, if a matching command is entered.  | 
  
   
- Returns
 - commandHandle on success (needed for unextend), or -1 on error.
 
 
 
◆ unextend() [1/2]
  
  
      
        
          | bool ustd::Console::unextend  | 
          ( | 
          int  | 
          commandHandle | ) | 
           | 
         
       
   | 
  
inlineinherited   | 
  
 
Removes a custom command from the console 
- Parameters
 - 
  
    | commandHandle | The commandHandle of the command to remove.  | 
  
   
- Returns
 - true on success.
 
 
 
◆ unextend() [2/2]
  
  
      
        
          | bool ustd::Console::unextend  | 
          ( | 
          String  | 
          command | ) | 
           | 
         
       
   | 
  
inlineinherited   | 
  
 
Removes a custom command from the console 
- Parameters
 - 
  
    | command | The name of the command to remove.  | 
  
   
- Returns
 - true on success.
 
 
 
The documentation for this class was generated from the following file: