diag-trace 5.0.1
µOS++ Tracing Infrastructure
Loading...
Searching...
No Matches

Primary C++ functions for outputting trace messages. More...

Functions

int micro_os_plus::trace::printf (const char *format,...) noexcept
 Write a formatted string to the trace output channel.
int micro_os_plus::trace::putchar (int c) noexcept
 Write the single character to the trace output channel.
int micro_os_plus::trace::puts (const char *s="") noexcept
 Write the string and a line terminator to the trace output channel.
int micro_os_plus::trace::vprintf (const char *format, std::va_list arguments) noexcept
 Write a formatted variable arguments list to the trace output channel.

Detailed Description

These functions serve as the primary methods for outputting trace messages in C++ projects.

Function Documentation

◆ printf()

int micro_os_plus::trace::printf ( const char * format,
... )
inlinenoexcept
Parameters
formatA null terminated string with the format.
...Additional arguments matching the format specifiers.
Returns
The number of bytes written, or -1 if an error occurred.

Thin wrapper over tracer<T>::printf(). Subject to the same fixed-size stack buffer constraint and truncation behaviour; the return value cannot be used to detect whether truncation occurred.

Definition at line 254 of file cpp-api-inlines.h.

255 {
256 std::va_list arguments;
257 va_start (arguments, format);
258
259 int ret
261
262 va_end (arguments);
263 return ret;
264 }
static int vprintf(const char *format, std::va_list arguments) noexcept
Write a formatted variable arguments list to the trace output channel.

References micro_os_plus::trace::detail::tracer< T >::vprintf().

Referenced by micro_os_plus::trace::detail::tracer< T >::dump_args().

◆ putchar()

int micro_os_plus::trace::putchar ( int c)
inlinenoexcept
Parameters
cA single byte character, passed as an int.
Returns
The written character as an int, or EOF (-1) if an error occurred.

Thin wrapper over tracer<T>::putchar().

Definition at line 279 of file cpp-api-inlines.h.

280 {
282 }
static int putchar(int c) noexcept
Write the single character to the trace output channel.

References micro_os_plus::trace::detail::tracer< T >::putchar().

◆ puts()

int micro_os_plus::trace::puts ( const char * s = "")
inlinenoexcept
Parameters
sA null terminated string (default: empty string).
Returns
The total number of bytes written (string + newline), or EOF (-1) if an error occurred.

Thin wrapper over tracer<T>::puts().

Definition at line 273 of file cpp-api-inlines.h.

274 {
276 }
static int puts(const char *s="") noexcept
Write the string and a line terminator to the trace output channel.

References micro_os_plus::trace::detail::tracer< T >::puts().

◆ vprintf()

int micro_os_plus::trace::vprintf ( const char * format,
std::va_list arguments )
inlinenoexcept
Parameters
formatA null terminated string with the format.
argumentsA variable arguments list.
Returns
The number of bytes written, or -1 if an error occurred.

Thin wrapper over tracer<T>::vprintf(). Subject to the same fixed-size stack buffer constraint and truncation behaviour; the return value cannot be used to detect whether truncation occurred.

Definition at line 267 of file cpp-api-inlines.h.

268 {
269 return detail::tracer<detail::implementation>::vprintf (format, arguments);
270 }

References micro_os_plus::trace::detail::tracer< T >::vprintf().

Referenced by micro_os_plus::trace::detail::tracer< T >::printf().