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

Method MessageV

src/Platform/Platform.cpp:3117–3148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3115}
3116
3117void Platform::MessageV(const GCodeBuffer *_ecv_null gb, MessageType type, const char *_ecv_array fmt, va_list vargs) noexcept
3118{
3119 String<FormatStringLength> formatString;
3120#if HAS_SBC_INTERFACE
3121 if (reprap.UsingSbcInterface() && ((type & GenericMessage) == GenericMessage || (type & BinaryCodeReplyFlag) != 0))
3122 {
3123 formatString.vprintf(fmt, vargs);
3124 reprap.GetSbcInterface().HandleGCodeReply(type, formatString.c_str());
3125 if ((type & BinaryCodeReplyFlag) != 0)
3126 {
3127 return;
3128 }
3129 }
3130#endif
3131
3132 if ((type & ErrorMessageFlag) != 0)
3133 {
3134 formatString.copy("Error: ");
3135 formatString.vcatf(fmt, vargs);
3136 }
3137 else if ((type & WarningMessageFlag) != 0)
3138 {
3139 formatString.copy("Warning: ");
3140 formatString.vcatf(fmt, vargs);
3141 }
3142 else
3143 {
3144 formatString.vprintf(fmt, vargs);
3145 }
3146
3147 RawMessage(gb, (MessageType)(type & ~(ErrorMessageFlag | WarningMessageFlag)), formatString.c_str());
3148}
3149
3150void Platform::MessageF(MessageType type, const char *_ecv_array fmt, ...) noexcept
3151{

Callers 2

MessageFMethod · 0.80
onStatusMethod · 0.80

Calls 5

UsingSbcInterfaceMethod · 0.80
vprintfMethod · 0.80
copyMethod · 0.80
vcatfMethod · 0.80
HandleGCodeReplyMethod · 0.45

Tested by

no test coverage detected