MCPcopy Create free account
hub / github.com/bdring/FluidNC / sendLine

Method sendLine

FluidNC/src/Channel.cpp:295–302  ·  view source on GitHub ↗

This overload is used primarily with fixed string values. It sends a pointer to the string whose memory does not need to be reclaimed later. This is the most efficient form, but it only works with fixed messages.

Source from the content-addressed store, hash-verified

293// This is the most efficient form, but it only works
294// with fixed messages.
295void Channel::sendLine(MsgLevel level, const char* line) {
296 if (outputTask) {
297 LogMessage msg { this, (void*)line, level, false };
298 while (!xQueueSend(message_queue, &msg, 10)) {}
299 } else {
300 print_msg(level, line);
301 }
302}
303
304// This overload is used primarily with log_*() where
305// a std::string is dynamically allocated with "new",

Callers 1

~LogStreamMethod · 0.45

Calls 1

c_strMethod · 0.80

Tested by

no test coverage detected