MCPcopy Create free account
hub / github.com/Duet3D/RepRapFirmware / MessageAcknowledged

Method MessageAcknowledged

src/GCodes/GCodeBuffer/GCodeBuffer.cpp:1239–1259  ·  view source on GitHub ↗

Tell this input source that any message it sent and is waiting on has been acknowledged Allow for the possibility that the source may have started running a macro since it started waiting

Source from the content-addressed store, hash-verified

1237// Tell this input source that any message it sent and is waiting on has been acknowledged
1238// Allow for the possibility that the source may have started running a macro since it started waiting
1239void GCodeBuffer::MessageAcknowledged(bool cancelled, bool shouldAbort, uint32_t seq, ExpressionValue rslt) noexcept
1240{
1241 for (GCodeMachineState *_ecv_null ms = machineState; ms != nullptr; ms = ms->GetPrevious())
1242 {
1243 if (ms->waitingForAcknowledgement && (seq == ms->msgBoxSeq || seq == 0 || ms->msgBoxSeq == 0))
1244 {
1245 ms->waitingForAcknowledgement = false;
1246 ms->messageAcknowledged = true;
1247 ms->messageShouldAbort = cancelled && shouldAbort;
1248 m291Result = rslt;
1249 if (cancelled)
1250 {
1251 lastResult = GCodeResult::m291Cancelled;
1252 }
1253#if HAS_SBC_INTERFACE
1254 messageAcknowledged = !(cancelled && shouldAbort) || !ms->DoingFile();
1255 reprap.GetSbcInterface().EventOccurred();
1256#endif
1257 }
1258 }
1259}
1260
1261MessageType GCodeBuffer::GetResponseMessageType() const noexcept
1262{

Callers 2

MessageBoxClosedMethod · 0.80
InvalidateResourcesMethod · 0.80

Calls 3

DoingFileMethod · 0.80
EventOccurredMethod · 0.80
GetPreviousMethod · 0.45

Tested by

no test coverage detected