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

Method Append

src/Platform/OutputMemory.cpp:631–647  ·  view source on GitHub ↗

Append another OutputStack to this instance. If no more space is available, all OutputBuffers that can't be added are automatically released

Source from the content-addressed store, hash-verified

629// Append another OutputStack to this instance. If no more space is available,
630// all OutputBuffers that can't be added are automatically released
631void OutputStack::Append(volatile OutputStack& stack) volatile noexcept
632{
633 for (size_t i = 0; i < stack.count; i++)
634 {
635 if (count < OUTPUT_STACK_DEPTH)
636 {
637 items[count] = stack.items[i];
638 types[count] = stack.types[i];
639 count++;
640 }
641 else
642 {
643 reprap.GetPlatform().LogError(ErrorCode::OutputStackOverflow);
644 OutputBuffer::ReleaseAll(stack.items[i]);
645 }
646 }
647}
648
649// Increase the number of references for each OutputBuffer on the stack
650void OutputStack::IncreaseReferences(size_t num) volatile noexcept

Callers 3

SendFileInfoMethod · 0.80
SendGCodeReplyMethod · 0.80
SendJsonResponseMethod · 0.80

Calls 1

LogErrorMethod · 0.80

Tested by

no test coverage detected