Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Hammacher <bmasterc@gmail.com>2019-06-25 12:54:39 +0300
committerChristian Hammacher <bmasterc@gmail.com>2019-06-25 12:54:39 +0300
commit5b7f021cba21231c2099d268442cf0faea66e34c (patch)
tree4565159c0e520c73cbb1dbffdcfc266292b1aa76 /src/GCodes/GCodeQueue.h
parent3825c7f2890cb07856925e3d7d489c36f1fee13c (diff)
parentd8bf587c5fa3c6514bc4f3a3c17b4b5beb4e6110 (diff)
Merge remote-tracking branch 'origin/v3-dev' into v3-chrishamm
Diffstat (limited to 'src/GCodes/GCodeQueue.h')
-rw-r--r--src/GCodes/GCodeQueue.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/GCodes/GCodeQueue.h b/src/GCodes/GCodeQueue.h
index fe6feb2f..757424e5 100644
--- a/src/GCodes/GCodeQueue.h
+++ b/src/GCodes/GCodeQueue.h
@@ -8,26 +8,30 @@
#define GCODEQUEUE_H
#include "RepRapFirmware.h"
-#include "GCodeBuffer/GCodeBuffer.h"
+#include "GCodeInput.h"
class QueuedCode;
const size_t BufferSizePerQueueItem = SHORT_GCODE_LENGTH;
-class GCodeQueue
+class GCodeQueue : public GCodeInput
{
public:
GCodeQueue();
- static bool ShouldQueueCode(GCodeBuffer &gb); // Return true if this code should be queued
- bool QueueCode(GCodeBuffer &gb); // Queue a G-code and return true if it could be stored
- bool FillBuffer(GCodeBuffer *gb); // If there is another move to execute at this time, fill a buffer
+ void Reset() override; // Clean all the cached data from this input
+ bool FillBuffer(GCodeBuffer *gb) override; // If there is another move to execute at this time, fill a buffer
+ size_t BytesCached() const override; // How many bytes have been cached?
+
+ bool QueueCode(GCodeBuffer &gb); // Queue a G-code
void PurgeEntries(); // Remove stored codes when a print is being paused
void Clear(); // Clean up all the stored codes
bool IsIdle() const; // Return true if there is nothing to do
void Diagnostics(MessageType mtype);
+ static bool ShouldQueueCode(GCodeBuffer &gb); // Return true if this code should be queued
+
private:
QueuedCode *freeItems;
QueuedCode *queuedItems;