task.hh
1 // Copyright 2007 Jeff Epler <jepler@unpythonic.net> 2 // 3 // This program is free software; you can redistribute it and/or modify 4 // it under the terms of the GNU General Public License as published by 5 // the Free Software Foundation; either version 2 of the License, or 6 // (at your option) any later version. 7 // 8 // This program is distributed in the hope that it will be useful, 9 // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 // GNU General Public License for more details. 12 // 13 // You should have received a copy of the GNU General Public License 14 // along with this program; if not, write to the Free Software 15 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 #ifndef EMC_TASK_HH 17 #define EMC_TASK_HH 18 #include "taskclass.hh" 19 extern NMLmsg *emcTaskCommand; 20 extern int stepping; 21 extern int steppingWait; 22 extern int emcTaskQueueCommand(NMLmsg *cmd); 23 extern int emcPluginCall(EMC_EXEC_PLUGIN_CALL *call_msg); 24 extern int emcIoPluginCall(EMC_IO_PLUGIN_CALL *call_msg); 25 extern int emcTaskOnce(const char *inifile); 26 extern int emcRunHalFiles(const char *filename); 27 28 // Returns 0 if all joints are homed, 1 if any joints are un-homed. 29 int all_homed(void); 30 31 int emcTaskInit(); 32 int emcTaskHalt(); 33 int emcTaskAbort(); 34 int emcTaskSetMode(int mode); 35 int emcTaskSetState(int state); 36 int emcTaskPlanInit(); 37 int emcTaskPlanSetWait(); 38 int emcTaskPlanIsWait(); 39 int emcTaskPlanClearWait(); 40 int emcTaskPlanSynch(); 41 int emcTaskPlanSetOptionalStop(bool state); 42 int emcTaskPlanSetBlockDelete(bool state); 43 void emcTaskPlanExit(); 44 int emcTaskPlanOpen(const char *file); 45 int emcTaskPlanRead(); 46 int emcTaskPlanExecute(const char *command); 47 int emcTaskPlanExecute(const char *command, int line_number); //used in case of MDI to pass the pseudo line number to interp 48 int emcTaskPlanPause(); 49 int emcTaskPlanResume(); 50 int emcTaskPlanClose(); 51 int emcTaskPlanReset(); 52 53 int emcTaskPlanLine(); 54 int emcTaskPlanLevel(); 55 int emcTaskPlanCommand(char *cmd); 56 57 int emcTaskUpdate(EMC_TASK_STAT * stat); 58 59 #endif 60