change initialisation in main to suit new framework, also print some disk stats
[clinton/Smoothieware.git] / src / libs / Module.h
CommitLineData
df27a6a3 1/*
4cff3ded
AW
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.
df27a6a3 5 You should have received a copy of the GNU General Public License along with Smoothie. If not, see <http://www.gnu.org/licenses/>.
4cff3ded
AW
6*/
7
8#ifndef MODULE_H
9#define MODULE_H
10
b6c86164
AW
11#include <string>
12using std::string;
b6c86164 13
4cff3ded 14// Module base class
df27a6a3 15// All modules must extend this class, see http://smoothieware.org/moduleexample
4cff3ded
AW
16class Kernel;
17class Module {
18 public:
19 Module();
20 virtual void on_module_loaded();
21 virtual void register_for_event(int event_id);
22 virtual void on_main_loop(void * argument);
23 virtual void on_console_line_received( void * argument);
24 virtual void on_gcode_received( void * argument);
25 virtual void on_gcode_execute( void * argument);
26 virtual void on_stepper_wake_up( void * argument);
27 virtual void on_speed_change( void * argument);
28 virtual void on_block_begin( void * argument);
29 virtual void on_block_end( void * argument);
da24d6ae 30 virtual void on_config_reload( void * argument);
befcf5cc
AW
31 virtual void on_play( void * argument);
32 virtual void on_pause( void * argument);
70c25627 33 virtual void on_idle( void * argument);
4cff3ded
AW
34 Kernel * kernel;
35};
36
37#endif