Skip to main content

trace-c-api.h File

C header file with the declarations for the C trace API. More...

Included Headers

#include <stdarg.h> #include <sys/types.h> #include "inlines/trace-c-api-inlines.h"

Functions Index

voidmicro_os_plus_trace_dump_args (int argc, char *argv[])

Write the argv[] array to the trace output channel. More...

voidmicro_os_plus_trace_flush (void)

Flush the trace output channel. More...

voidmicro_os_plus_trace_initialise (void)

Initialise the trace output channel. More...

intmicro_os_plus_trace_printf (const char *format,...)

Write a formatted string to the trace output channel. More...

intmicro_os_plus_trace_putchar (int c)

Write the single character to the trace output channel. More...

intmicro_os_plus_trace_puts (const char *s)

Write the string and a line terminator to the trace output channel. More...

intmicro_os_plus_trace_vprintf (const char *format, va_list arguments)

Write a formatted variable arguments list to the trace output channel. More...

ssize_tmicro_os_plus_trace_write (const void *buf, size_t nbyte)

Write the given number of bytes to the trace output channel. More...

Description

C header file with the declarations for the C trace API.

Empty inline stubs (used when tracing is disabled) are located in trace-c-api-inlines.h, included at the bottom of this file. This file is included by <micro-os-plus/diag/trace.h>, which should be used instead of including this file directly.

File Listing

The file content with the documentation metadata removed is:

1/*
2 * This file is part of the µOS++ project (https://micro-os-plus.github.io/).
3 * Copyright (c) 2015-2026 Liviu Ionescu. All rights reserved.
4 *
5 * Permission to use, copy, modify, and/or distribute this software
6 * for any purpose is hereby granted, under the terms of the MIT license.
7 *
8 * If a copy of the license was not distributed with this file, it can
9 * be obtained from https://opensource.org/licenses/mit.
10 */
11
12// ----------------------------------------------------------------------------
13
24
25// ----------------------------------------------------------------------------
26
27#if !defined(MICRO_OS_PLUS_DIAG_TRACE_H_)
28#error "Do not include this file directly; use <micro-os-plus/diag/trace.h>."
29#endif // MICRO_OS_PLUS_DIAG_TRACE_H_
30
31// ----------------------------------------------------------------------------
32
33#ifndef MICRO_OS_PLUS_DIAG_TRACE_C_API_H_
34#define MICRO_OS_PLUS_DIAG_TRACE_C_API_H_
35
36// ----------------------------------------------------------------------------
37
38// #include <stdint.h>
39#include <stdarg.h>
40// #include <stdlib.h>
41
42#include <sys/types.h>
43
44// ----------------------------------------------------------------------------
45
46#if defined(MICRO_OS_PLUS_DIAG_TRACE_ENABLED)
47
48// ----------------------------------------------------------------------------
49
50#if defined(__cplusplus)
51extern "C"
52{
53#endif // defined(__cplusplus)
54
55 // --------------------------------------------------------------------------
56
72 void
74
91 ssize_t
92 micro_os_plus_trace_write (const void* buf, size_t nbyte);
93
111 void
113
131 int
132 micro_os_plus_trace_printf (const char* format, ...)
133 __attribute__ ((format (printf, 1, 2)));
134
150 int
151 micro_os_plus_trace_vprintf (const char* format, va_list arguments);
152
169 int
170 micro_os_plus_trace_puts (const char* s);
171
185 int
187
207 void
208 micro_os_plus_trace_dump_args (int argc, char* argv[]);
209
210 // --------------------------------------------------------------------------
211
212#if defined(__cplusplus)
213}
214#endif // defined(__cplusplus)
215
216// ----------------------------------------------------------------------------
217
218#endif // defined(MICRO_OS_PLUS_DIAG_TRACE_ENABLED)
219
220// ============================================================================
221// Templates, inlines & constexpr implementations.
222
224
225// ----------------------------------------------------------------------------
226
227#endif // MICRO_OS_PLUS_DIAG_TRACE_C_API_H_
228
229// ----------------------------------------------------------------------------

Generated via doxygen2docusaurus 2.2.1 by Doxygen 1.17.0.