Stéphane Cachat
/
Smoothie
smoothie port to mbed online compiler (smoothieware.org)
Embed:
(wiki syntax)
Show/hide line numbers
SimpleShell.h
00001 /* 00002 This file is part of Smoothie (http://smoothieware.org/). The motion control part is heavily based on Grbl (https://github.com/simen/grbl). 00003 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. 00004 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. 00005 You should have received a copy of the GNU General Public License along with Smoothie. If not, see <http://www.gnu.org/licenses/>. 00006 */ 00007 00008 00009 #ifndef simpleshell_h 00010 #define simpleshell_h 00011 00012 #include "libs/Kernel.h" 00013 #include "libs/nuts_bolts.h" 00014 #include "libs/utils.h" 00015 #include "libs/StreamOutput.h" 00016 00017 00018 #define ls_command_checksum 19679 00019 #define cd_command_checksum 11207 00020 #define pwd_command_checksum 42060 00021 #define cat_command_checksum 24889 00022 #define play_command_checksum 17335 00023 #define reset_command_checksum 27429 00024 00025 class SimpleShell : public Module { 00026 public: 00027 SimpleShell(){} 00028 00029 virtual void on_module_loaded(); 00030 virtual void on_console_line_received( void* argument ); 00031 virtual void on_main_loop( void* argument ); 00032 string absolute_from_relative( string path ); 00033 void ls_command( string parameters, StreamOutput* stream ); 00034 void cd_command( string parameters, StreamOutput* stream ); 00035 void pwd_command( string parameters, StreamOutput* stream ); 00036 void cat_command( string parameters, StreamOutput* stream ); 00037 void play_command( string parameters, StreamOutput* stream ); 00038 void reset_command(string parameters, StreamOutput* stream ); 00039 00040 string current_path; 00041 bool playing_file; 00042 StreamOutput* current_stream; 00043 FILE* current_file_handler; 00044 }; 00045 00046 00047 #endif
Generated on Tue Jul 12 2022 14:14:42 by 1.7.2