2 This file is part of Smoothie (http://smoothieware.org/). The motion control part is heavily based on Grbl (https://github.com/simen/grbl).
3 Smoothie is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
4 Smoothie is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
5 You should have received a copy of the GNU General Public License along with Smoothie. If not, see <http://www.gnu.org/licenses/>.
12 #include "libs/Kernel.h"
13 #include "libs/nuts_bolts.h"
14 #include "libs/utils.h"
15 #include "libs/StreamOutput.h"
17 class SimpleShell
: public Module
22 void on_module_loaded();
23 void on_console_line_received( void *argument
);
24 void on_gcode_received(void *argument
);
25 void on_second_tick(void *);
28 string
absolute_from_relative( string path
);
29 void ls_command(string parameters
, StreamOutput
*stream
);
30 void cd_command(string parameters
, StreamOutput
*stream
);
31 void delete_file_command(string parameters
, StreamOutput
*stream
);
32 void pwd_command(string parameters
, StreamOutput
*stream
);
33 void cat_command(string parameters
, StreamOutput
*stream
);
34 void rm_command(string parameters
, StreamOutput
*stream
);
35 void break_command(string parameters
, StreamOutput
*stream
);
36 void reset_command(string parameters
, StreamOutput
*stream
);
37 void dfu_command(string parameters
, StreamOutput
*stream
);
38 void help_command(string parameters
, StreamOutput
*stream
);
39 void version_command(string parameters
, StreamOutput
*stream
);
40 void get_command(string parameters
, StreamOutput
*stream
);
41 void set_temp_command(string parameters
, StreamOutput
*stream
);
42 void mem_command(string parameters
, StreamOutput
*stream
);
43 void test_command(string parameters
, StreamOutput
*stream
);
45 bool parse_command(unsigned short cs
, string args
, StreamOutput
*stream
);
47 typedef void (SimpleShell::*PFUNC
)(string parameters
, StreamOutput
*stream
);
49 unsigned short command_cs
;
53 static ptentry_t commands_table
[];