gnea\grbl-Mega  1.0f
Source Code Documentation ( Internal Workings )
report.h
Go to the documentation of this file.
1 /*
2  report.h - reporting and messaging methods
3  Part of Grbl
4 
5  Copyright (c) 2012-2016 Sungeun K. Jeon for Gnea Research LLC
6 
7  Grbl is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  Grbl is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with Grbl. If not, see <http://www.gnu.org/licenses/>.
19 */
20 #ifndef report_h
21 #define report_h
22 #define STATUS_OK 0
24 #define STATUS_EXPECTED_COMMAND_LETTER 1
25 #define STATUS_BAD_NUMBER_FORMAT 2
26 #define STATUS_INVALID_STATEMENT 3
27 #define STATUS_NEGATIVE_VALUE 4
28 #define STATUS_SETTING_DISABLED 5
29 #define STATUS_SETTING_STEP_PULSE_MIN 6
30 #define STATUS_SETTING_READ_FAIL 7
31 #define STATUS_IDLE_ERROR 8
32 #define STATUS_SYSTEM_GC_LOCK 9
33 #define STATUS_SOFT_LIMIT_ERROR 10
34 #define STATUS_OVERFLOW 11
35 #define STATUS_MAX_STEP_RATE_EXCEEDED 12
36 #define STATUS_CHECK_DOOR 13
37 #define STATUS_LINE_LENGTH_EXCEEDED 14
38 #define STATUS_TRAVEL_EXCEEDED 15
39 #define STATUS_INVALID_JOG_COMMAND 16
40 
41 #define STATUS_GCODE_UNSUPPORTED_COMMAND 20
42 #define STATUS_GCODE_MODAL_GROUP_VIOLATION 21
43 #define STATUS_GCODE_UNDEFINED_FEED_RATE 22
44 #define STATUS_GCODE_COMMAND_VALUE_NOT_INTEGER 23
45 #define STATUS_GCODE_AXIS_COMMAND_CONFLICT 24
46 #define STATUS_GCODE_WORD_REPEATED 25
47 #define STATUS_GCODE_NO_AXIS_WORDS 26
48 #define STATUS_GCODE_INVALID_LINE_NUMBER 27
49 #define STATUS_GCODE_VALUE_WORD_MISSING 28
50 #define STATUS_GCODE_UNSUPPORTED_COORD_SYS 29
51 #define STATUS_GCODE_G53_INVALID_MOTION_MODE 30
52 #define STATUS_GCODE_AXIS_WORDS_EXIST 31
53 #define STATUS_GCODE_NO_AXIS_WORDS_IN_PLANE 32
54 #define STATUS_GCODE_INVALID_TARGET 33
55 #define STATUS_GCODE_ARC_RADIUS_ERROR 34
56 #define STATUS_GCODE_NO_OFFSETS_IN_PLANE 35
57 #define STATUS_GCODE_UNUSED_WORDS 36
58 #define STATUS_GCODE_G43_DYNAMIC_AXIS_ERROR 37
59 #define STATUS_GCODE_MAX_VALUE_EXCEEDED 38
60 #define ALARM_HARD_LIMIT_ERROR EXEC_ALARM_HARD_LIMIT
62 #define ALARM_SOFT_LIMIT_ERROR EXEC_ALARM_SOFT_LIMIT
63 #define ALARM_ABORT_CYCLE EXEC_ALARM_ABORT_CYCLE
64 #define ALARM_PROBE_FAIL_INITIAL EXEC_ALARM_PROBE_FAIL_INITIAL
65 #define ALARM_PROBE_FAIL_CONTACT EXEC_ALARM_PROBE_FAIL_CONTACT
66 #define ALARM_HOMING_FAIL_RESET EXEC_ALARM_HOMING_FAIL_RESET
67 #define ALARM_HOMING_FAIL_DOOR EXEC_ALARM_HOMING_FAIL_DOOR
68 #define ALARM_HOMING_FAIL_PULLOFF EXEC_ALARM_HOMING_FAIL_PULLOFF
69 #define ALARM_HOMING_FAIL_APPROACH EXEC_ALARM_HOMING_FAIL_APPROACH
70 #define MESSAGE_CRITICAL_EVENT 1
72 #define MESSAGE_ALARM_LOCK 2
73 #define MESSAGE_ALARM_UNLOCK 3
74 #define MESSAGE_ENABLED 4
75 #define MESSAGE_DISABLED 5
76 #define MESSAGE_SAFETY_DOOR_AJAR 6
77 #define MESSAGE_CHECK_LIMITS 7
78 #define MESSAGE_PROGRAM_END 8
79 #define MESSAGE_RESTORE_DEFAULTS 9
80 #define MESSAGE_SPINDLE_RESTORE 10
81 #define MESSAGE_SLEEP_MODE 11
82 void report_status_message(uint8_t status_code);
85 void report_alarm_message(uint8_t alarm_code);
87 void report_feedback_message(uint8_t message_code);
89 void report_init_message();
91 void report_grbl_help();
95 void report_echo_line_received(char *line);
101 void report_ngc_parameters();
103 void report_gcode_modes();
105 void report_startup_line(uint8_t n, char *line);
106 void report_execute_startup_message(char *line, uint8_t status_code);
108 void report_build_info(char *line);
109 
110 #ifdef DEBUG
111  void report_realtime_debug();
112 #endif
113 
114 #endif
void report_gcode_modes()
Prints current g-code parser mode state.
Definition: report.c:263
void report_grbl_help()
Prints Grbl help and current global settings.
Definition: report.c:171
void report_init_message()
Prints welcome message.
Definition: report.c:166
void report_execute_startup_message(char *line, uint8_t status_code)
Definition: report.c:334
void report_grbl_settings()
Prints Grbl global settings.
Definition: report.c:178
void report_probe_parameters()
Prints recorded probe position.
Definition: report.c:221
void report_status_message(uint8_t status_code)
Prints system status messages.
Definition: report.c:110
void report_feedback_message(uint8_t message_code)
Prints miscellaneous feedback messages.
Definition: report.c:135
void report_alarm_message(uint8_t alarm_code)
Prints system alarm messages.
Definition: report.c:122
void report_ngc_parameters()
Prints Grbl NGC parameters (coordinate offsets, probe)
Definition: report.c:234
void report_echo_line_received(char *line)
Prints an echo of the pre-parsed line received right before execution.
Definition: report.c:402
void report_startup_line(uint8_t n, char *line)
Prints startup line when requested and executed.
Definition: report.c:325
void report_realtime_status()
Prints realtime status report.
Definition: report.c:414
void report_build_info(char *line)
Prints build info and user info.
Definition: report.c:342