Prusa MINI Firmware overview
|
#include <queue.h>
Public Member Functions | |
GCodeQueue () | |
Static Public Member Functions | |
static void | stop () |
static void | clear () |
static void | inject_P (PGM_P const pgcode) |
static void | enqueue_one_now (const char *cmd) |
static void | enqueue_now_P (PGM_P const cmd) |
static bool | has_commands_queued () |
static void | advance () |
static void | get_available_commands () |
static void | ok_to_send () |
static void | flush_and_request_resend () |
static bool | enqueue_one (const char *cmd) |
Static Public Attributes | |
static long | last_N |
static long | stopped_N = 0 |
static uint8_t | length = 0 |
static uint8_t | index_r = 0 |
static char | command_buffer [BUFSIZE][MAX_CMD_SIZE] |
Marlin 3D Printer Firmware Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
Based on Sprinter and grbl. Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
This program 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.
This program 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.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. queue.h - The G-code command queue, which holds commands before they go to the parser and dispatcher.
GCodeQueue::GCodeQueue | ( | ) |
|
static |
|
static |
Enqueue one or many commands to run from program memory. Aborts the current queue, if any. Note: process_injected_command() will process them.
Enqueue one or many commands to run from program memory. Do not inject a comment or use leading spaces! Aborts the current queue, if any. Note: process_injected_command() will be called to drain any commands afterwards
Enqueue and return only when commands are actually enqueued
Enqueue and return only when commands are actually enqueued. Never call this from a G-code handler!
Enqueue from program memory and return only when commands are actually enqueued
Enqueue from program memory and return only when commands are actually enqueued Never call this from a G-code handler!
|
static |
Check whether there are any commands yet to be executed
|
static |
Get the next command in the queue, optionally log it to SD, then dispatch it
|
static |
Add to the circular command queue the next command from:
|
static |
Send an "ok" message to the host, indicating that a command was successfully processed.
If ADVANCED_OK is enabled also include: N<int> Line number of the command, if any P<int> Planner space remaining B<int> Block queue space remaining
|
static |
Clear the serial line and request a resend of the next expected line number.
Send a "Resend: nnn" message to the host to indicate that a command needs to be re-sent.
|
static |
Enqueue with Serial Echo Return true on success
Enqueue with Serial Echo Return true if the command was consumed
|
static |
GCode line number handling. Hosts may include line numbers when sending commands to Marlin, and lines will be checked for sequentiality. M110 N<int> sets the current line number.
|
static |
|
static |
GCode Command Queue A simple ring buffer of BUFSIZE command strings.
Commands are copied into this buffer by the command injectors (immediate, serial, sd card) and they are processed sequentially by the main loop. The gcode.process_next_command method parses the next command and hands off execution to individual handler functions.
|
static |
|
static |